Skip to content

Commit 4946da9

Browse files
committed
chore: clippy/fmt/re-snap
Signed-off-by: Sam Gammon <[email protected]>
1 parent 9f92db6 commit 4946da9

File tree

6 files changed

+8
-22
lines changed

6 files changed

+8
-22
lines changed

src/lib.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ use directories::ProjectDirs;
102102
use is_terminal::IsTerminal;
103103
use kdl::{KdlDocument, KdlNode, KdlValue};
104104
use miette::{IntoDiagnostic, Result};
105-
use tracing::instrument;
106105
use oro_config::{OroConfig, OroConfigLayerExt, OroConfigOptions};
106+
use tracing::instrument;
107107
use tracing_appender::non_blocking::WorkerGuard;
108108
use tracing_subscriber::{
109109
EnvFilter,
@@ -329,10 +329,7 @@ impl Orogene {
329329
.filter(|s| !s.is_empty())
330330
.filter_map(|s| {
331331
let dir: Result<Directive, _> = s.parse();
332-
match dir {
333-
Ok(dir) => Some(dir),
334-
Err(_) => None,
335-
}
332+
dir.ok()
336333
});
337334
let mut filter = builder.from_env_lossy();
338335
for directive in directives {
@@ -516,8 +513,7 @@ impl Orogene {
516513

517514
fn first_time_setup(&mut self) -> Result<()> {
518515
if let Some(config_path) = self.config.clone().or_else(|| {
519-
ProjectDirs::from("", "", "orogene")
520-
.map(|p| p.config_dir().to_owned().join("oro.kdl"))
516+
ProjectDirs::from("", "", "orogene").map(|p| p.config_dir().to_owned().join("oro.kdl"))
521517
}) {
522518
let config_dir = config_path.parent().expect("must have parent");
523519
if !config_dir.exists() {

tests/snapshots/help__add.snap

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Add packages as devDependencies
3939
4040
Add packages as optionalDependencies
4141
42-
\[aliases: optional]
42+
\[aliases: --optional]
4343
4444
#### `-h, --help`
4545
@@ -69,7 +69,7 @@ Whether to skip restoring packages into `node_modules` and just resolve the tree
6969
7070
Make the resolver error if the newly-resolved tree would defer from an existing lockfile
7171
72-
\[aliases: frozen]
72+
\[aliases: --frozen]
7373
7474
#### `--no-scripts`
7575
@@ -214,5 +214,3 @@ Can also be configured through the `NO_PROXY` environment variable, like `NO_PRO
214214
How many times to retry failed network operations
215215
216216
\[default: 2]
217-
218-

tests/snapshots/help__apply.snap

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Whether to skip restoring packages into `node_modules` and just resolve the tree
4949

5050
Make the resolver error if the newly-resolved tree would defer from an existing lockfile
5151

52-
\[aliases: frozen]
52+
\[aliases: --frozen]
5353

5454
#### `--no-scripts`
5555

@@ -194,5 +194,3 @@ Can also be configured through the `NO_PROXY` environment variable, like `NO_PRO
194194
How many times to retry failed network operations
195195
196196
\[default: 2]
197-
198-

tests/snapshots/help__reapply.snap

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Whether to skip restoring packages into `node_modules` and just resolve the tree
4545

4646
Make the resolver error if the newly-resolved tree would defer from an existing lockfile
4747

48-
\[aliases: frozen]
48+
\[aliases: --frozen]
4949

5050
#### `--no-scripts`
5151

@@ -190,5 +190,3 @@ Can also be configured through the `NO_PROXY` environment variable, like `NO_PRO
190190
How many times to retry failed network operations
191191
192192
\[default: 2]
193-
194-

tests/snapshots/help__remove.snap

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Whether to skip restoring packages into `node_modules` and just resolve the tree
5353
5454
Make the resolver error if the newly-resolved tree would defer from an existing lockfile
5555
56-
\[aliases: frozen]
56+
\[aliases: --frozen]
5757
5858
#### `--no-scripts`
5959
@@ -198,5 +198,3 @@ Can also be configured through the `NO_PROXY` environment variable, like `NO_PRO
198198
How many times to retry failed network operations
199199
200200
\[default: 2]
201-
202-

tests/snapshots/help__view.snap

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,5 +142,3 @@ Can also be configured through the `NO_PROXY` environment variable, like `NO_PRO
142142
How many times to retry failed network operations
143143
144144
\[default: 2]
145-
146-

0 commit comments

Comments
 (0)