@@ -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