Skip to content

Commit

Permalink
Clarify implementation limitations of funcs in doc comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mqudsi committed Feb 9, 2023
1 parent 3e3f827 commit 0b68d59
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3290,6 +3290,9 @@ impl Tool {
self.args.push(flag);
}

/// Checks if an argument or flag has already been specified or conflicts.
///
/// Currently only checks optimization flags.
fn is_duplicate_opt_arg(&self, flag: &OsString) -> bool {
let flag = flag.to_str().unwrap();
let mut chars = flag.chars();
Expand Down Expand Up @@ -3317,7 +3320,7 @@ impl Tool {
return false;
}

/// Don't push optimization arg if it conflicts with existing args
/// Don't push optimization arg if it conflicts with existing args.
fn push_opt_unless_duplicate(&mut self, flag: OsString) {
if self.is_duplicate_opt_arg(&flag) {
println!("Info: Ignoring duplicate arg {:?}", &flag);
Expand Down

0 comments on commit 0b68d59

Please sign in to comment.