@@ -97,11 +97,11 @@ impl FlattenedProtectedAttribute {
9797 }
9898}
9999
100- impl Into < BytesWithDescriptor > for FlattenedProtectedAttribute {
101- fn into ( self ) -> BytesWithDescriptor {
102- BytesWithDescriptor {
103- bytes : self . plaintext . to_vec ( ) ,
104- descriptor : self . storage_descriptor ( ) ,
100+ impl From < FlattenedProtectedAttribute > for BytesWithDescriptor {
101+ fn from ( fpa : FlattenedProtectedAttribute ) -> Self {
102+ Self {
103+ bytes : fpa . plaintext . to_vec ( ) ,
104+ descriptor : fpa . storage_descriptor ( ) ,
105105 }
106106 }
107107}
@@ -150,12 +150,12 @@ impl FlattenedAttrName {
150150 /// Parse a descriptor into a [FlattenedKey].
151151 pub ( super ) fn parse ( descriptor : & str ) -> Self {
152152 fn split_subkey ( prefix : Option < String > , key : & str ) -> FlattenedAttrName {
153- match key. split_once ( "." ) {
153+ match key. split_once ( '.' ) {
154154 None => FlattenedAttrName :: new ( prefix, key) ,
155155 Some ( ( key, subkey) ) => FlattenedAttrName :: new ( prefix, key) . with_subkey ( subkey) ,
156156 }
157157 }
158- match descriptor. split_once ( "/" ) {
158+ match descriptor. split_once ( '/' ) {
159159 None => split_subkey ( None , descriptor) ,
160160 Some ( ( prefix, key) ) => split_subkey ( Some ( prefix. to_string ( ) ) , key) ,
161161 }
0 commit comments