Skip to content

Commit

Permalink
fix(all): lints and fmt and clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
SpikeHD committed Feb 1, 2024
1 parent dd9bfe8 commit 1d5087b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions backend/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,12 @@ fn recursive_serve(app: &mut tide::Server<State>, path: Option<&Path>) {
}

fn serve_info(app: &mut tide::Server<State>) {
app.at("/api/version_info")
app
.at("/api/version_info")
.get(|_req: tide::Request<State>| async move {
let mut res = tide::Response::new(200);
res.set_body(util::version_string());
res.set_content_type("text/plain");
Ok(res)
});
}
}
4 changes: 2 additions & 2 deletions backend/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ pub fn version_string() -> String {
}

fn no_quotes(s: &str) -> String {
s.replace("\"", "").replace("'", "")
}
s.replace(['\"', '\''], "")
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"start": "cd ./frontend && npm run build && cd ../backend && cargo run -- -u test -k test",
"build:bun": "cd ./frontend && bun run build && cd ../backend && cargo build --release",
"build": "cd ./frontend && npm run build && cd ../backend && cargo build --release",
"clippy:fix": "cargo clippy --manifest-path ./backend/Cargo.toml --all --fix",
"clippy:fix": "cargo clippy --manifest-path ./backend/Cargo.toml --all --allow-dirty --fix",
"fmt:fix": "cargo fmt --manifest-path ./backend/Cargo.toml --all",
"lint": "cd ./frontend && eslint ./src/**/*.tsx",
"lint:fix": "cd ./frontend && eslint --fix ./src/**/*.tsx"
Expand Down

0 comments on commit 1d5087b

Please sign in to comment.