Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ unstable-mobile-app = ["apple-catalog-parsing"]
[workspace.lints.clippy]
allow-attributes = "warn"
str-to-string = "warn"
string-to-string = "warn"
unnecessary-wraps = "warn"
unwrap-used = "warn"

Expand Down
2 changes: 1 addition & 1 deletion src/commands/debug_files/bundle_jvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
let local_path_jvm_ext = local_path.with_extension("jvm");
let url = format!("~/{}", path_as_url(&local_path_jvm_ext));
(
url.to_string(),
url.clone(),
SourceFile {
url,
path: source.path.clone(),
Expand Down
2 changes: 1 addition & 1 deletion src/commands/files/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
let url = format!("{}/{}{}", url_prefix, path_as_url(local_path), url_suffix);

(
url.to_string(),
url.clone(),
SourceFile {
url,
path: source.path.clone(),
Expand Down
2 changes: 1 addition & 1 deletion src/commands/send_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {

if let Some(fingerprint) = matches.get_many::<String>("fingerprint") {
event.fingerprint = fingerprint
.map(|x| x.to_string().into())
.map(|x| x.clone().into())
.collect::<Vec<_>>()
.into();
}
Expand Down
2 changes: 1 addition & 1 deletion src/commands/sourcemaps/explain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ fn print_mapped_frame(frame: &Frame) {
fn extract_release(event: &ProcessedEvent) -> Result<String> {
if let Some(release) = event.release.as_ref() {
success(format!("Event has release name: {release}"));
Ok(release.to_string())
Ok(release.clone())
} else {
error("Event is missing a release name");
tip("Configure 'release' option in the SDK.\n \
Expand Down
7 changes: 3 additions & 4 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,7 @@ impl Config {
);
}
Some(Auth::Key(ref val)) => {
self.ini
.set_to(Some("auth"), "api_key".into(), val.to_string());
self.ini.set_to(Some("auth"), "api_key".into(), val.clone());
}
None => {}
}
Expand Down Expand Up @@ -351,7 +350,7 @@ impl Config {
format_err!("An organization ID or slug is required (provide with --org)")
}),
(None, Some(cli_org)) => Ok(cli_org),
(Some(token_org), None) => Ok(token_org.to_string()),
(Some(token_org), None) => Ok(token_org.clone()),
(Some(token_org), Some(cli_org)) => {
if cli_org != *token_org {
log::warn!(
Expand Down Expand Up @@ -381,7 +380,7 @@ impl Config {
// Backward compatibility with `releases files <VERSION>` commands.
pub fn get_release_with_legacy_fallback(&self, matches: &ArgMatches) -> Result<String> {
if let Some(version) = matches.get_one::<String>("version") {
Ok(version.to_string())
Ok(version.clone())
} else {
self.get_release(matches)
}
Expand Down
11 changes: 5 additions & 6 deletions src/utils/sourcemaps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ impl SourceMapProcessor {
.iter()
.map(|x| x.1)
.filter(|x| x.ty == SourceFileType::SourceMap)
.map(|x| x.url.to_string())
.map(|x| x.url.clone())
.collect();

for source in self.sources.values_mut() {
Expand Down Expand Up @@ -325,15 +325,14 @@ impl SourceMapProcessor {
source.warn(format!(
"could not determine a source map reference ({err})"
));
self.sourcemap_references
.insert(source.url.to_string(), None);
self.sourcemap_references.insert(source.url.clone(), None);
continue;
}
},
};

self.sourcemap_references
.insert(source.url.to_string(), Some(sourcemap_reference));
.insert(source.url.clone(), Some(sourcemap_reference));
}
}

Expand Down Expand Up @@ -610,7 +609,7 @@ impl SourceMapProcessor {
}

if let Some(Some(sourcemap)) = self.sourcemap_references.get(&source.url) {
source.set_sourcemap_reference(sourcemap.url.to_string());
source.set_sourcemap_reference(sourcemap.url.clone());
}
}
}
Expand Down Expand Up @@ -925,7 +924,7 @@ impl SourceMapProcessor {

let sourcemap_url = match &matches[..] {
[] => normalized,
[x] => x.to_string(),
[x] => x.clone(),
_ => {
warn!("Ambiguous matches for sourcemap path {normalized}:");
for path in matches {
Expand Down
4 changes: 2 additions & 2 deletions src/utils/vcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ pub fn find_heads(
} else {
for repo in repos {
let spec = CommitSpec {
repo: repo.name.to_string(),
repo: repo.name.clone(),
path: None,
rev: "HEAD".into(),
prev_rev: None,
Expand All @@ -433,7 +433,7 @@ pub fn find_heads(
find_matching_rev(spec.reference(), &spec, repos, false, remote_name.clone())?
{
rv.push(Ref {
repo: repo.name.to_string(),
repo: repo.name.clone(),
rev,
prev_rev: None,
});
Expand Down
Loading