Skip to content

Latest commit

 

History

History
22 lines (14 loc) · 470 Bytes

File metadata and controls

22 lines (14 loc) · 470 Bytes

const_path_join

What it does: Checks for joining of constant path components.

Why is this bad? Such paths can be constructed from string literals using /, since / works as a path separator on both Unix and Windows (see std::path::Path).

Known problems: None.

Example:

PathBuf::from("..").join("target")

Use instead:

PathBuf::from("../target")