Skip to content

Commit c907750

Browse files
committed
just use format
1 parent f4f014c commit c907750

File tree

3 files changed

+2
-16
lines changed

3 files changed

+2
-16
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/rust/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ publish = true
1414
async-compression = { version = "0.4.27", features = ["tokio", "zstd"] }
1515
bytes = { workspace = true }
1616
futures-util = { workspace = true }
17-
itoa = "1.0.15"
1817
objectstore-types = { workspace = true }
1918
reqwest = { workspace = true, features = ["json", "stream"] }
2019
sentry-core = { version = ">=0.41", features = ["client"] }

clients/rust/src/client.rs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -222,24 +222,12 @@ impl Scope {
222222
}
223223

224224
fn for_organization(usecase: Usecase, organization: u64) -> Self {
225-
let mut buf = itoa::Buffer::new();
226-
let organization = buf.format(organization);
227-
let mut scope = String::with_capacity(4 + organization.len());
228-
scope.push_str("org.");
229-
scope.push_str(organization);
225+
let scope = format!("org.{}", organization);
230226
Self(Ok(ScopeInner { usecase, scope }))
231227
}
232228

233229
fn for_project(usecase: Usecase, organization: u64, project: u64) -> Self {
234-
let mut buf = itoa::Buffer::new();
235-
let organization = buf.format(organization);
236-
let mut buf = itoa::Buffer::new();
237-
let project = buf.format(project);
238-
let mut scope = String::with_capacity(4 + organization.len() + 9 + project.len());
239-
scope.push_str("org.");
240-
scope.push_str(organization);
241-
scope.push_str("/project.");
242-
scope.push_str(project);
230+
let scope = format!("org.{}/project.{}", organization, project);
243231
Self(Ok(ScopeInner { usecase, scope }))
244232
}
245233

0 commit comments

Comments
 (0)