@@ -51,15 +51,14 @@ impl From<bool> for StoredAuthorizationStatus {
5151
5252/// Coordinator that inspects persisted state first, falls back to the
5353/// platform's prompt callback, and writes the authorization back so future
54- /// calls short-circuit. Generic over the concrete `CoreStorage` + `Permissions` impls
55- /// so callers (e.g. `PlatformRuntimeHost<P>`) can stay non-`dyn`.
56- pub struct PermissionsService < ' a , S : CoreStorage , P : Permissions > {
54+ /// calls short-circuit.
55+ pub struct PermissionsService < ' a , S : CoreStorage + ?Sized , P : Permissions + ?Sized > {
5756 storage : & ' a S ,
5857 prompt : & ' a P ,
5958 product_id : & ' a str ,
6059}
6160
62- impl < ' a , S : CoreStorage , P : Permissions > PermissionsService < ' a , S , P > {
61+ impl < ' a , S : CoreStorage + ? Sized , P : Permissions + ? Sized > PermissionsService < ' a , S , P > {
6362 /// Construct a service backed by the given storage + prompt callbacks.
6463 pub fn new ( storage : & ' a S , prompt : & ' a P , product_id : & ' a str ) -> Self {
6564 Self {
@@ -194,7 +193,7 @@ impl<'a, S: CoreStorage, P: Permissions> PermissionsService<'a, S, P> {
194193 }
195194}
196195
197- async fn authorization_status < S : CoreStorage > (
196+ async fn authorization_status < S : CoreStorage + ? Sized > (
198197 storage : & S ,
199198 key : CoreStorageKey ,
200199) -> Result < PermissionAuthorizationStatus , GenericError > {
@@ -204,7 +203,7 @@ async fn authorization_status<S: CoreStorage>(
204203 . unwrap_or ( PermissionAuthorizationStatus :: NotDetermined ) )
205204}
206205
207- async fn peek_stored < S : CoreStorage > (
206+ async fn peek_stored < S : CoreStorage + ? Sized > (
208207 storage : & S ,
209208 key : CoreStorageKey ,
210209) -> Result < Option < StoredAuthorizationStatus > , GenericError > {
@@ -214,7 +213,7 @@ async fn peek_stored<S: CoreStorage>(
214213 Ok ( StoredAuthorizationStatus :: decode ( & mut & * raw) . ok ( ) )
215214}
216215
217- async fn set_authorization_status < S : CoreStorage > (
216+ async fn set_authorization_status < S : CoreStorage + ? Sized > (
218217 storage : & S ,
219218 key : CoreStorageKey ,
220219 status : PermissionAuthorizationStatus ,
@@ -281,6 +280,7 @@ mod tests {
281280 inner : Mutex < HashMap < String , Vec < u8 > > > ,
282281 }
283282
283+ #[ truapi_platform:: async_trait]
284284 impl CoreStorage for MemStorage {
285285 async fn read_core_storage (
286286 & self ,
@@ -324,6 +324,7 @@ mod tests {
324324 }
325325 }
326326
327+ #[ truapi_platform:: async_trait]
327328 impl Permissions for ScriptedPrompt {
328329 async fn device_permission (
329330 & self ,
@@ -588,6 +589,7 @@ mod tests {
588589 /// path (fail closed for the current call, but do not persist the error).
589590 struct FailingPrompt ;
590591
592+ #[ truapi_platform:: async_trait]
591593 impl Permissions for FailingPrompt {
592594 async fn device_permission (
593595 & self ,
@@ -663,6 +665,7 @@ mod tests {
663665 #[ derive( Default ) ]
664666 struct FailingStorage ;
665667
668+ #[ truapi_platform:: async_trait]
666669 impl CoreStorage for FailingStorage {
667670 async fn read_core_storage (
668671 & self ,
0 commit comments