File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ pub enum Constant {
2121 /// A `String` (e.g., "abc").
2222 Str ( String ) ,
2323 /// A binary string (e.g., `b"abc"`).
24- Binary ( Lrc < Vec < u8 > > ) ,
24+ Binary ( Lrc < [ u8 ] > ) ,
2525 /// A single `char` (e.g., `'a'`).
2626 Char ( char ) ,
2727 /// An integer's bit representation.
@@ -155,7 +155,7 @@ pub fn lit_to_constant(lit: &LitKind, ty: Option<Ty<'_>>) -> Constant {
155155 match * lit {
156156 LitKind :: Str ( ref is, _) => Constant :: Str ( is. to_string ( ) ) ,
157157 LitKind :: Byte ( b) => Constant :: Int ( u128:: from ( b) ) ,
158- LitKind :: ByteStr ( ref s) => Constant :: Binary ( Lrc :: clone ( s ) ) ,
158+ LitKind :: ByteStr ( ref s) => Constant :: Binary ( Lrc :: from ( s . as_slice ( ) ) ) ,
159159 LitKind :: Char ( c) => Constant :: Char ( c) ,
160160 LitKind :: Int ( n, _) => Constant :: Int ( n) ,
161161 LitKind :: Float ( ref is, LitFloatType :: Suffixed ( fty) ) => match fty {
You can’t perform that action at this time.
0 commit comments