Shut up clippy.

This commit is contained in:
Stephen Chung
2022-08-27 16:26:41 +08:00
parent d80184ba14
commit bf5d6ab35a
28 changed files with 313 additions and 205 deletions

View File

@@ -3,9 +3,8 @@
#![cfg(feature = "metadata")]
use crate::module::FuncInfo;
use crate::plugin::*;
use crate::tokenizer::{is_valid_function_name, Token};
use crate::{Engine, Module, Scope, INT};
use crate::{Engine, FnAccess, Module, Scope, INT};
#[cfg(feature = "no_std")]
use std::prelude::v1::*;
@@ -117,19 +116,20 @@ impl Definitions<'_> {
}
/// Get the [`Engine`].
#[inline(always)]
pub fn engine(&self) -> &Engine {
#[must_use]
pub const fn engine(&self) -> &Engine {
self.engine
}
/// Get the [`Scope`].
#[inline(always)]
#[must_use]
pub fn scope(&self) -> Option<&Scope> {
pub const fn scope(&self) -> Option<&Scope> {
self.scope
}
/// Get the configuration.
#[inline(always)]
#[must_use]
pub(crate) fn config(&self) -> &DefinitionsConfig {
pub(crate) const fn config(&self) -> &DefinitionsConfig {
&self.config
}
}