fix clippy warning on not windows

This commit is contained in:
gluaxspeed 2021-08-10 23:44:18 -07:00
parent 62b26ad705
commit 7d7671f126

View File

@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with the Leo library. If not, see <https://www.gnu.org/licenses/>. // along with the Leo library. If not, see <https://www.gnu.org/licenses/>.
use leo_errors::{CliError, Result}; use leo_errors::Result;
use std::{fmt, sync::Once}; use std::{fmt, sync::Once};
@ -214,7 +214,7 @@ where
pub fn init_logger(_app_name: &'static str, verbosity: usize) -> Result<()> { pub fn init_logger(_app_name: &'static str, verbosity: usize) -> Result<()> {
// This line enables Windows 10 ANSI coloring API. // This line enables Windows 10 ANSI coloring API.
#[cfg(target_family = "windows")] #[cfg(target_family = "windows")]
ansi_term::enable_ansi_support().map_err(|_| CliError::failed_to_enable_ansi_support())?; ansi_term::enable_ansi_support().map_err(|_| leo_errors::CliError::failed_to_enable_ansi_support())?;
use tracing_subscriber::fmt::writer::MakeWriterExt; use tracing_subscriber::fmt::writer::MakeWriterExt;