Skip to content

Commit

Permalink
chore: code style
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc committed Oct 16, 2024
1 parent dffd25e commit 256df7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/binding/src/js_plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ impl Plugin for JsPlugin {
self.name.as_deref().unwrap_or("js_plugin")
}

fn enforce(&self) -> Option<String> {
self.enforce.clone()
fn enforce(&self) -> Option<&str> {
self.enforce.as_deref()
}

fn build_start(&self, _context: &Arc<Context>) -> Result<()> {
Expand Down
2 changes: 1 addition & 1 deletion crates/mako/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub struct PluginGenerateEndParams {
pub trait Plugin: Any + Send + Sync {
fn name(&self) -> &str;

fn enforce(&self) -> Option<String> {
fn enforce(&self) -> Option<&str> {
None
}

Check warning on line 55 in crates/mako/src/plugin.rs

View check run for this annotation

Codecov / codecov/patch

crates/mako/src/plugin.rs#L53-L55

Added lines #L53 - L55 were not covered by tests

Expand Down

0 comments on commit 256df7b

Please sign in to comment.