Skip to content

Commit 532b816

Browse files
committed
refactor(linter): use to_string instead of into (#12147)
Follow-on after #11980. Pure refactor, and this is a matter of personal preference. Personally, I find `.into()` confusing as it's not clear "into what?". I find more explicit code like `.to_string()` clearer.
1 parent 89f2a69 commit 532b816

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/oxc_linter/src/config/config_builder.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ impl ConfigStoreBuilder {
414414

415415
let resolved = resolver.resolve(oxlintrc_dir_path, plugin_name).map_err(|e| {
416416
ConfigBuilderError::PluginLoadFailed {
417-
plugin_name: plugin_name.into(),
417+
plugin_name: plugin_name.to_string(),
418418
error: e.to_string(),
419419
}
420420
})?;
@@ -425,14 +425,14 @@ impl ConfigStoreBuilder {
425425
tokio::runtime::Handle::current().block_on((external_linter.load_plugin)(plugin_path))
426426
})
427427
.map_err(|e| ConfigBuilderError::PluginLoadFailed {
428-
plugin_name: plugin_name.into(),
428+
plugin_name: plugin_name.to_string(),
429429
error: e.to_string(),
430430
})?;
431431

432432
match result {
433433
PluginLoadResult::Success => Ok(()),
434434
PluginLoadResult::Failure(e) => Err(ConfigBuilderError::PluginLoadFailed {
435-
plugin_name: plugin_name.into(),
435+
plugin_name: plugin_name.to_string(),
436436
error: e,
437437
}),
438438
}

0 commit comments

Comments
 (0)