Skip to content

Commit

Permalink
Merge pull request #1344 from bvssvni/master
Browse files Browse the repository at this point in the history
Use `dyn` keyword in pistoncore-window
  • Loading branch information
bvssvni committed May 30, 2020
2 parents 661ec4b + 7e6e162 commit e8214ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/window/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ pub trait BuildFromWindowSettings: Sized {
///
/// See your backend's documentation for details about what kind of
/// error strings can be returned, and the conditions for error.
fn build_from_window_settings(settings: &WindowSettings) -> Result<Self, Box<Error>>;
fn build_from_window_settings(settings: &WindowSettings) -> Result<Self, Box<dyn Error>>;
}

/// Trait representing the minimum requirements for defining a window.
Expand Down Expand Up @@ -461,7 +461,7 @@ impl WindowSettings {
/// This function will return an error if your backend returns an error.
/// See your backend's documentation on `build_from_window_settings()`
/// for more details.
pub fn build<W: BuildFromWindowSettings>(&self) -> Result<W, Box<Error>> {
pub fn build<W: BuildFromWindowSettings>(&self) -> Result<W, Box<dyn Error>> {
BuildFromWindowSettings::build_from_window_settings(self)
}

Expand Down
2 changes: 1 addition & 1 deletion src/window/src/no_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl BuildFromWindowSettings for NoWindow {
/// # Errors
///
/// This function will always return without error.
fn build_from_window_settings(settings: &WindowSettings) -> Result<Self, Box<Error>> {
fn build_from_window_settings(settings: &WindowSettings) -> Result<Self, Box<dyn Error>> {
Ok(NoWindow::new(settings))
}
}
Expand Down

0 comments on commit e8214ab

Please sign in to comment.