···30353035 fn test_scopes_buffer_size_limit() {
30363036 // Test buffer exceeding u16 limit is rejected.
30373037 let too_long = "a".repeat(u16::MAX as usize + 1);
30383038- let smol = SmolStr::from(too_long.as_str());
30383038+ let smol = too_long.as_str().to_smolstr();
30393039 let result = Scopes::new(smol);
30403040 assert!(result.is_err());
30413041 }
+2-2
crates/jacquard-oauth/src/session.rs
···2424};
2525use jose_jwk::Key;
2626use serde::{Deserialize, Serialize};
2727-use smol_str::{SmolStr, format_smolstr};
2727+use smol_str::{SmolStr, ToSmolStr, format_smolstr};
2828use tokio::sync::Mutex;
29293030/// Provides DPoP key material and per-server nonces to the DPoP proof-building machinery.
···139139 {
140140 if let Some(scope_str) = token_set.scope.as_ref() {
141141 // Parse scopes from the returned scope string, converting to the appropriate backing type
142142- let scopes_smol = Scopes::new(SmolStr::from(scope_str.as_ref()))
142142+ let scopes_smol = Scopes::new(scope_str.as_ref().to_smolstr())
143143 .expect("server returned invalid scopes in token refresh");
144144 self.scopes = scopes_smol.convert();
145145 }