Refine inlining.

This commit is contained in:
Stephen Chung
2022-09-28 12:06:22 +08:00
parent 82b64e9c7a
commit 6c777e68d3
31 changed files with 68 additions and 49 deletions

View File

@@ -75,8 +75,8 @@ impl CustomExpr {
/// Is this custom syntax self-terminated (i.e. no need for a semicolon terminator)?
///
/// A self-terminated custom syntax always ends in `$block$`, `}` or `;`
#[must_use]
#[inline(always)]
#[must_use]
pub const fn is_self_terminated(&self) -> bool {
self.self_terminated
}
@@ -281,7 +281,6 @@ impl<F: Float> Deref for FloatWrapper<F> {
type Target = F;
#[inline(always)]
#[must_use]
fn deref(&self) -> &Self::Target {
&self.0
}
@@ -290,7 +289,6 @@ impl<F: Float> Deref for FloatWrapper<F> {
#[cfg(not(feature = "no_float"))]
impl<F: Float> DerefMut for FloatWrapper<F> {
#[inline(always)]
#[must_use]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
@@ -447,6 +445,7 @@ pub enum Expr {
impl Default for Expr {
#[inline(always)]
#[must_use]
fn default() -> Self {
Self::Unit(Position::NONE)
}