@@ -2,7 +2,7 @@ use crate::{
22 builtins:: { PyStr , PyTypeRef } ,
33 common:: lock:: PyRwLock ,
44 convert:: ToPyObject ,
5- Py , PyObject , PyObjectRef , PyRef , PyRefExact ,
5+ Py , PyExact , PyObject , PyObjectRef , PyRef , PyRefExact ,
66} ;
77use std:: {
88 borrow:: { Borrow , ToOwned } ,
@@ -199,7 +199,7 @@ impl std::fmt::Display for PyStrInterned {
199199mod sealed {
200200 use crate :: {
201201 builtins:: PyStr ,
202- object:: { Py , PyRefExact } ,
202+ object:: { Py , PyExact , PyRefExact } ,
203203 } ;
204204
205205 pub trait SealedInternable { }
@@ -211,7 +211,7 @@ mod sealed {
211211 pub trait SealedMaybeInterned { }
212212
213213 impl SealedMaybeInterned for str { }
214- impl SealedMaybeInterned for PyRefExact < PyStr > { }
214+ impl SealedMaybeInterned for PyExact < PyStr > { }
215215 impl SealedMaybeInterned for Py < PyStr > { }
216216}
217217
@@ -259,6 +259,13 @@ impl MaybeInterned for str {
259259 }
260260}
261261
262+ impl MaybeInterned for PyExact < PyStr > {
263+ #[ inline( always) ]
264+ fn as_interned ( & self ) -> Option < & ' static PyStrInterned > {
265+ None
266+ }
267+ }
268+
262269impl MaybeInterned for Py < PyStr > {
263270 #[ inline( always) ]
264271 fn as_interned ( & self ) -> Option < & ' static PyStrInterned > {
0 commit comments