Skip to content

Commit 27a9096

Browse files
committed
chore: formatting / unnecessary clone
1 parent 2adc5e1 commit 27a9096

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

rust/patchable/src/main.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,8 @@ impl ProductVersionContext {
4848
"loading config"
4949
);
5050

51-
toml::from_str::<T>(&std::fs::read_to_string(path).context(
52-
LoadConfigSnafu {
53-
path,
54-
},
55-
)?)
56-
.context(ParseConfigSnafu {
57-
path,
58-
})
51+
toml::from_str::<T>(&std::fs::read_to_string(path).context(LoadConfigSnafu { path })?)
52+
.context(ParseConfigSnafu { path })
5953
}
6054

6155
fn load_product_config(&self) -> Result<ProductConfig> {
@@ -496,7 +490,7 @@ fn main() -> Result<()> {
496490
mirror_remote
497491
.push(&[&refspec], Some(&mut push_options))
498492
.context(PushToMirrorSnafu {
499-
url: mirror_url.clone(),
493+
url: mirror_url,
500494
refspec: &refspec,
501495
commit: base_commit,
502496
})?;
@@ -507,9 +501,7 @@ fn main() -> Result<()> {
507501
tracing::info!(?base, base.commit = ?base_commit, "resolved base commit");
508502

509503
tracing::info!("saving version-level configuration");
510-
let config = ProductVersionConfig {
511-
base: base_commit,
512-
};
504+
let config = ProductVersionConfig { base: base_commit };
513505
let config_path = ctx.version_config_path();
514506
if let Some(config_dir) = config_path.parent() {
515507
std::fs::create_dir_all(config_dir)

rust/patchable/src/repo.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ pub fn resolve_and_fetch_commitish(
169169
);
170170
true
171171
});
172-
173172
repo.remote_anonymous(upstream_url)
174173
.context(CreateRemoteSnafu {
175174
repo,

0 commit comments

Comments
 (0)