Reduce unnecessary generics.

This commit is contained in:
Stephen Chung
2022-10-20 15:31:57 +08:00
parent f8888c83e7
commit c24794187f
8 changed files with 88 additions and 30 deletions

View File

@@ -7,6 +7,7 @@ use crate::{calc_fn_hash, Position, StaticVec, INT};
#[cfg(feature = "no_std")]
use std::prelude::v1::*;
use std::{
borrow::Borrow,
collections::BTreeMap,
fmt,
hash::Hash,
@@ -443,6 +444,14 @@ impl DerefMut for StmtBlock {
}
}
impl Borrow<[Stmt]> for StmtBlock {
#[inline(always)]
#[must_use]
fn borrow(&self) -> &[Stmt] {
&self.block
}
}
impl AsRef<[Stmt]> for StmtBlock {
#[inline(always)]
#[must_use]