Skip to content

Commit

Permalink
Simplified error message creation
Browse files Browse the repository at this point in the history
  • Loading branch information
myFavShrimp committed Jul 13, 2024
1 parent 21738b7 commit ab9a37f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions turf_macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! You're probably looking for `turf` instead.

use convert_case::{Case, Casing};
use std::{collections::HashMap, path::PathBuf, time::Duration};
use std::{collections::HashMap, path::PathBuf};
use turf_internals::{CompiledStyleSheet, StyleSheetKind};

use proc_macro::TokenStream;
Expand Down Expand Up @@ -125,11 +125,11 @@ fn to_compile_error<E>(e: E) -> TokenStream
where
E: std::error::Error,
{
let mut message = format!("Error: {}", e.to_string());
let mut message = format!("Error: {}", e);
let mut curr_err = e.source();

if curr_err.is_some() {
message.push_str(&format!("\nCaused by:"));
message.push_str("\nCaused by:");
}

while let Some(current_error) = curr_err {
Expand Down

0 comments on commit ab9a37f

Please sign in to comment.