Skip to content

Commit

Permalink
chore: fix clippy ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Enter-tainer committed May 7, 2024
1 parent 8534af3 commit 793656e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions crates/mitex-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,11 @@ fn process_opts(mut opts: Opts) -> Result<Opts, clap::Error> {
match io_args.len() {
0 => {}
1 => {
args.input = io_args[0].clone();
args.input.clone_from(&io_args[0]);
}
2 => {
args.input = io_args[0].clone();
args.output = io_args[1].clone();
args.input.clone_from(&io_args[0]);
args.output.clone_from(&io_args[1]);
}
_ => Err(clap::Error::raw(
clap::error::ErrorKind::ValueValidation,
Expand All @@ -226,7 +226,7 @@ fn process_opts(mut opts: Opts) -> Result<Opts, clap::Error> {
))?;
}
if args.output.is_empty() {
args.output = std::path::Path::new(&args.input)
std::path::Path::new(&args.input)
.with_extension("tex")
.to_str()
.ok_or_else(|| {
Expand All @@ -235,7 +235,7 @@ fn process_opts(mut opts: Opts) -> Result<Opts, clap::Error> {
"Input file name is invalid.",
)
})?
.to_owned();
.clone_into(&mut args.output);
}
}

Expand Down
4 changes: 2 additions & 2 deletions crates/mitex-lexer/src/snapshot_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ where
}
}

pub fn get<Q: ?Sized>(&self, k: &Q) -> Option<&V>
pub fn get<Q>(&self, k: &Q) -> Option<&V>
where
K: Borrow<Q>,
Q: Hash + Eq,
Q: Hash + Eq + ?Sized,
{
self.map.borrow().get(k)
}
Expand Down

0 comments on commit 793656e

Please sign in to comment.