Skip to content

Commit 81e940a

Browse files
ref: Apply cargo fmt to src/commands
Previously, `cargo fmt` was unable to find these files, so CI could not enforce formatting. Fortunately, seems as though most contributors have been using rust-analyzer locally, so there are only a few formatter violations to fix here.
1 parent 3fb1353 commit 81e940a

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

src/commands/mobile_app/upload.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use std::borrow::Cow;
2-
use std::io::Write;
3-
use std::path::Path;
42
#[cfg(not(windows))]
53
use std::fs;
4+
use std::io::Write;
65
#[cfg(not(windows))]
76
use std::os::unix::fs::PermissionsExt;
7+
use std::path::Path;
88

99
use anyhow::{anyhow, bail, Context as _, Result};
1010
use clap::{Arg, ArgAction, ArgMatches, Command};
@@ -256,9 +256,14 @@ fn normalize_directory(path: &Path) -> Result<TempFile> {
256256
.filter(|entry| entry.path().is_file())
257257
.map(|entry| {
258258
let entry_path = entry.into_path();
259-
let relative_path = entry_path.strip_prefix(
260-
path.parent().ok_or_else(|| anyhow!("Cannot determine parent directory for path: {}", path.display()))?
261-
)?.to_owned();
259+
let relative_path = entry_path
260+
.strip_prefix(path.parent().ok_or_else(|| {
261+
anyhow!(
262+
"Cannot determine parent directory for path: {}",
263+
path.display()
264+
)
265+
})?)?
266+
.to_owned();
262267
Ok((entry_path, relative_path))
263268
})
264269
.collect::<Result<Vec<_>>>()?

src/commands/react_native/gradle.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
119119

120120
if let Some(version) = version {
121121
for dist in matches.get_many::<String>("dist").unwrap() {
122-
println!(
123-
"Uploading sourcemaps for release {version} distribution {dist}"
124-
);
122+
println!("Uploading sourcemaps for release {version} distribution {dist}");
125123

126124
processor.upload(&UploadContext {
127125
org: &org,

src/commands/send_metric/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ This command will validate input parameters and attempt to send a metric to \
3838
Sentry. Due to network errors and rate limits, the metric is not guaranteed to \
3939
arrive. Check the debug output for transmission errors by passing --log-level=\
4040
debug or setting `SENTRY_LOG_LEVEL=debug`."))]
41-
#[command(hide=true)]
41+
#[command(hide = true)]
4242
enum SendMetricSubcommand {
4343
#[command(about = format!("[DEPRECATED] {INCREMENT_ABOUT}"))]
4444
#[command(long_about = format!("{DEPRECATION_MESSAGE}{{n}}{{n}}{INCREMENT_ABOUT}"))]

0 commit comments

Comments
 (0)