Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/mir.rs')
-rw-r--r--crates/hir-ty/src/mir.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir-ty/src/mir.rs b/crates/hir-ty/src/mir.rs
index 20e035c8b2..7bef6f0d0f 100644
--- a/crates/hir-ty/src/mir.rs
+++ b/crates/hir-ty/src/mir.rs
@@ -98,16 +98,16 @@ pub enum Operand {
}
impl Operand {
- fn from_concrete_const(data: Vec<u8>, memory_map: MemoryMap, ty: Ty) -> Self {
+ fn from_concrete_const(data: Box<[u8]>, memory_map: MemoryMap, ty: Ty) -> Self {
Operand::Constant(intern_const_scalar(ConstScalar::Bytes(data, memory_map), ty))
}
- fn from_bytes(data: Vec<u8>, ty: Ty) -> Self {
+ fn from_bytes(data: Box<[u8]>, ty: Ty) -> Self {
Operand::from_concrete_const(data, MemoryMap::default(), ty)
}
fn const_zst(ty: Ty) -> Operand {
- Self::from_bytes(vec![], ty)
+ Self::from_bytes(Box::default(), ty)
}
fn from_fn(
@@ -118,7 +118,7 @@ impl Operand {
let ty =
chalk_ir::TyKind::FnDef(CallableDefId::FunctionId(func_id).to_chalk(db), generic_args)
.intern(Interner);
- Operand::from_bytes(vec![], ty)
+ Operand::from_bytes(Box::default(), ty)
}
}