Skip to content

Commit

Permalink
Formatted code
Browse files Browse the repository at this point in the history
  • Loading branch information
andmev committed Sep 27, 2024
1 parent 68c5eb9 commit f4af3cb
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 930 deletions.
925 changes: 0 additions & 925 deletions .yarn/releases/yarn-4.5.0.cjs

This file was deleted.

4 changes: 1 addition & 3 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
nodeLinker: node-modules

npmAuditRegistry: 'https://registry.npmjs.org'

yarnPath: .yarn/releases/yarn-4.5.0.cjs
npmAuditRegistry: 'https://registry.npmjs.org'
2 changes: 1 addition & 1 deletion src/checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub async fn has_access(img_path: &str) -> Result<String, Box<dyn Error>> {

/// Checks the syntax of the pattern. Returns a tuple of step width and height.
pub fn is_right_step(step: &str) -> Result<(String, String), &'static str> {
let parts: Vec<&str> = step.split(|c| c == 'x' || c == 'х').collect();
let parts: Vec<&str> = step.split(['x', 'х'].as_ref()).collect();
if parts.len() == 2 {
let width = parts[0].parse::<i32>().map_err(|_| "Invalid width")?;
let height = parts[1].parse::<i32>().map_err(|_| "Invalid height")?;
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![deny(clippy::all)]
#[deny(clippy::manual_pattern_char_comparison)]

mod checker;
mod converters;
Expand Down

0 comments on commit f4af3cb

Please sign in to comment.