Add a few inline directives in rustc_serialize.

This commit is contained in:
Camille GILLOT
2025-06-21 23:54:16 +00:00
parent 6d0c9e2a1c
commit 8e9552a6b5
2 changed files with 4 additions and 0 deletions
@@ -20,6 +20,7 @@ macro_rules! impl_debug_strict_add {
($( $ty:ty )*) => {
$(
impl DebugStrictAdd for $ty {
#[inline]
fn debug_strict_add(self, other: Self) -> Self {
if cfg!(debug_assertions) {
self + other
@@ -42,6 +43,7 @@ macro_rules! impl_debug_strict_sub {
($( $ty:ty )*) => {
$(
impl DebugStrictSub for $ty {
#[inline]
fn debug_strict_sub(self, other: Self) -> Self {
if cfg!(debug_assertions) {
self - other
+2
View File
@@ -89,10 +89,12 @@ pub fn flush(&mut self) {
self.buffered = 0;
}
#[inline]
pub fn file(&self) -> &File {
&self.file
}
#[inline]
pub fn path(&self) -> &Path {
&self.path
}