Skip to content

Commit

Permalink
address beta clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettMayson committed Oct 10, 2024
1 parent fb59d8e commit 8290937
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libs/preprocessor/src/codes/pe7_if_unit_or_function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ impl Code for IfUnitOrFunction {

impl IfUnitOrFunction {
#[must_use]
/// Create a new instance of `IfUnitOrFunction`
///
/// # Panics
/// Panics if the token does not define anything in the defines
pub fn new(token: Box<Token>, defines: &Defines) -> Self {
Self {
similar: defines
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ impl Code for FunctionCallArgumentCount {

impl FunctionCallArgumentCount {
#[must_use]
/// Create a new instance of `IfUnitOrFunction`
///
/// # Panics
/// Panics if the token does not define anything in the defines
pub fn new(token: Box<Token>, expected: usize, got: usize, defines: &Defines) -> Self {
Self {
expected,
Expand Down
2 changes: 2 additions & 0 deletions libs/sqf/src/compiler/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#![allow(clippy::cast_possible_truncation)]

//! Compiles a list of statements into an intermediate form that can be serialized.
//!
//! Since [`Compiled`]'s names and constants lists can be difficult to manage,
//! this module contains structs that allow for the creation of a sort of intermediate form
//! which can generate these lists automatically.
Expand Down
1 change: 1 addition & 0 deletions libs/sqf/src/compiler/serializer/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! This module contains the minimum required for the serializing SQFC files.
//!
//! The entrypoint to this is [`Compiled`], however it contains raw lists of constants and variable names,
//! which can be cumbersome to manage. For this reason, you should use structs from the
//! [`compiler`][crate::compiler] module instead.
Expand Down

0 comments on commit 8290937

Please sign in to comment.