Skip to content

Commit

Permalink
[FIX] Apply lints
Browse files Browse the repository at this point in the history
  • Loading branch information
GPlaczek committed Jan 31, 2024
1 parent 3443baf commit a473cfc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/internals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ fn source(
args: &mut [String],
output_device: &mut OutputDevice,
) -> Result<i32, Report> {
if let Some(filename) = args.get(0) {
if let Some(filename) = args.first() {
shell.run_script(filename).unwrap();
Ok(EXIT_SUCCESS)
} else {
Expand Down Expand Up @@ -265,7 +265,7 @@ fn shift(
if args.len() > 1 {
output_device.eprintln("shift: too many arguments");
Ok(EXIT_FAILURE)
} else if let Some(n) = &args.get(0) {
} else if let Some(n) = &args.first() {
if let Ok(m) = n.parse::<i32>() {
if m < 0 {
output_device.eprintln(&format!("shift: {m}: shift count out of range"));
Expand Down

0 comments on commit a473cfc

Please sign in to comment.