Box all the things in dummy platform

This commit is contained in:
Héctor Ramón Jiménez 2022-01-27 16:49:44 +07:00
parent a5ef1bf81e
commit 93c7e17090
No known key found for this signature in database
GPG key ID: 140CC052C94F138E

View file

@ -7,19 +7,19 @@ struct Dummy;
pub fn connect<W: HasRawWindowHandle>(
_window: &W,
) -> Result<Box<dyn ClipboardProvider>, Box<dyn std::error::Error>> {
Ok(Dummy)
Ok(Box::new(Dummy))
}
impl ClipboardProvider for Dummy {
fn read(&self) -> Result<String, Box<dyn std::error::Error>> {
Err(Error::Unimplemented)
Err(Box::new(Error::Unimplemented))
}
fn write(
&mut self,
contents: String,
) -> Result<(), Box<dyn std::error::Error>> {
Err(Error::Unimplemented)
Err(Box::new(Error::Unimplemented))
}
}