mirror of https://github.com/rust-lang/mdBook.git
c144c26dcf
Above mentioned function copies files (recursively) from a source to a destination directory. For that, file/directory paths have to be created repeatedly. This allocates as directory and file names are concatenated into an owning path structure. The number of allocations can be reduced by creating file/directory paths only once and borrowing them instead of cloning/recreating them. In bigger projects, this reduces execution time noticeably. Please note that file system operations are dominant from performance POV. |
||
---|---|---|
.. | ||
fs.rs | ||
mod.rs | ||
string.rs | ||
toml_ext.rs |