Skip to content

Commit f81f038

Browse files
committed
Apply clippy suggestions on error creation
1 parent d95c4bf commit f81f038

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/init.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ impl TemplateBuilder {
384384
let config = self
385385
.config
386386
.as_ref()
387-
.ok_or_else(|| io::Error::new(io::ErrorKind::Other, "Missing configuration"))?;
387+
.ok_or_else(|| io::Error::other("Missing configuration"))?;
388388

389389
if let Some(options) = &config.options {
390390
self.context.clear();
@@ -404,7 +404,7 @@ impl TemplateBuilder {
404404
let config = self
405405
.config
406406
.as_ref()
407-
.ok_or_else(|| io::Error::new(io::ErrorKind::Other, "Missing configuration"))?;
407+
.ok_or_else(|| io::Error::other("Missing configuration"))?;
408408

409409
if let Some(options) = &config.options {
410410
let all_defaults = options

0 commit comments

Comments
 (0)