Skip to content

Commit

Permalink
refactor: clean up inline clippy config
Browse files Browse the repository at this point in the history
  • Loading branch information
hoodie committed Nov 2, 2023
1 parent a96f99e commit 0b34ca1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 18 deletions.
2 changes: 1 addition & 1 deletion lang/default.pot
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ msgstr ""
msgid "Project file is younger than pdf, continue anyway?"
msgstr ""

#: /Users/hendrik/code/rust/asciii/src/lib.rs:82
#: /Users/hendrik/code/rust/asciii/src/lib.rs:70
msgid "Documentation at: {}"
msgstr ""

Expand Down
18 changes: 3 additions & 15 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,9 @@
//!
#![cfg_attr(feature = "manual", doc = include_str!("../manual.md"))]
#![allow(deprecated)]
#![allow(clippy::uninlined_format_args)]
#![warn(//missing_docs,
//missing_copy_implementations,
//missing_debug_implementations,
unstable_features,
unused_import_braces,
// clippy::pedantic
)]
// #![allow(
// clippy::if_not_else,
// clippy::must_use_candidate,
// clippy::missing_errors_doc,
// clippy::missing_panics_doc,
// clippy::wildcard_imports,
// )]
#![warn(
clippy::if_not_else,
)]
#![recursion_limit = "1024"]
#![deny(trivial_casts, trivial_numeric_casts)]
#![warn(unused_import_braces, unused_qualifications)]
Expand Down
2 changes: 1 addition & 1 deletion src/storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ pub fn get_storage_path() -> PathBuf {
// TODO: make replace tilde a Trait function
let storage_path = replace_home_tilde(&storage_path);

if !storage_path.is_absolute() {
if storage_path.is_relative() {
current_dir().unwrap().join(storage_path)
} else {
storage_path
Expand Down
2 changes: 1 addition & 1 deletion src/util/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ where
/// takes a path that could be relative or contains a `~` and turn it into a path that exists
pub fn get_valid_path<T: AsRef<OsStr>>(p: T) -> Option<PathBuf> {
let path = replace_home_tilde(Path::new(&p));
let path = if !path.is_absolute() {
let path = if path.is_relative() {
if cfg!(target_arch = "wasm32") {
Ok(PathBuf::from(std::env::var("PWD").expect("can't access $PWD")))
} else {
Expand Down

0 comments on commit 0b34ca1

Please sign in to comment.