Skip to content

Commit

Permalink
Use displaydoc.
Browse files Browse the repository at this point in the history
  • Loading branch information
rustonaut committed Jan 7, 2022
1 parent 3f017e4 commit 29735cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions dart-api-dl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ license = "Apache-2.0"

[dependencies]
dart-api-dl-sys = { package = "xayn-dart-api-dl-sys", version = "0.3.0" }
displaydoc = "0.2.3"
once_cell = "1.9.0"
static_assertions = "1.1.0"
thiserror = "1.0.30"
5 changes: 2 additions & 3 deletions dart-api-dl/src/lifecycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use std::ffi::c_void;

use dart_api_dl_sys::Dart_InitializeApiDL;

use displaydoc::Display;
use once_cell::sync::OnceCell;
use thiserror::Error;

Expand Down Expand Up @@ -98,14 +99,12 @@ impl DartRuntime {
}

/// Error representing that initialization failed.
#[derive(Debug, Clone, Error)]
#[derive(Debug, Clone, Error, Display)]
#[non_exhaustive]
pub enum InitializationFailed {
/// Initialization was not yet done.
#[error("initialize_dart_api_dl was not yet called")]
InitNotYetCalled,
/// Initialization failed.
#[error("initializing dart api dl failed")]
InitFailed,
}

Expand Down

0 comments on commit 29735cd

Please sign in to comment.