Skip to content

Commit

Permalink
Add const hint to fix clippy error (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
kampersanda authored Sep 23, 2024
1 parent 6b61e23 commit 433e6bd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion vibrato/src/dictionary/connector/matrix_connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub struct MatrixConnector {
}

impl MatrixConnector {
pub fn new(data: Vec<i16>, num_right: usize, num_left: usize) -> Self {
pub const fn new(data: Vec<i16>, num_right: usize, num_left: usize) -> Self {
Self {
data,
num_right,
Expand Down
4 changes: 2 additions & 2 deletions vibrato/src/dictionary/connector/raw_connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub struct RawConnector {
}

impl RawConnector {
pub fn new(
pub const fn new(
right_feat_ids: Vec<U31x8>,
left_feat_ids: Vec<U31x8>,
feat_template_size: usize,
Expand Down Expand Up @@ -169,7 +169,7 @@ pub struct RawConnectorBuilder {
}

impl RawConnectorBuilder {
pub fn new(
pub const fn new(
right_feat_ids_tmp: Vec<Vec<U31>>,
left_feat_ids_tmp: Vec<Vec<U31>>,
feat_template_size: usize,
Expand Down
2 changes: 1 addition & 1 deletion vibrato/src/dictionary/mapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub struct ConnIdMapper {
}

impl ConnIdMapper {
pub fn new(left: Vec<u16>, right: Vec<u16>) -> Self {
pub const fn new(left: Vec<u16>, right: Vec<u16>) -> Self {
Self { left, right }
}

Expand Down

0 comments on commit 433e6bd

Please sign in to comment.