Fix Error name collision in dummy platform
This commit is contained in:
parent
2000137a2d
commit
a5ef1bf81e
1 changed files with 6 additions and 4 deletions
|
|
@ -1,22 +1,24 @@
|
||||||
use crate::ClipboardProvider;
|
use crate::ClipboardProvider;
|
||||||
|
|
||||||
use raw_window_handle::HasRawWindowHandle;
|
use raw_window_handle::HasRawWindowHandle;
|
||||||
use std::error::Error;
|
|
||||||
|
|
||||||
struct Dummy;
|
struct Dummy;
|
||||||
|
|
||||||
pub fn connect<W: HasRawWindowHandle>(
|
pub fn connect<W: HasRawWindowHandle>(
|
||||||
_window: &W,
|
_window: &W,
|
||||||
) -> Result<Box<dyn ClipboardProvider>, Box<dyn Error>> {
|
) -> Result<Box<dyn ClipboardProvider>, Box<dyn std::error::Error>> {
|
||||||
Ok(Dummy)
|
Ok(Dummy)
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ClipboardProvider for Dummy {
|
impl ClipboardProvider for Dummy {
|
||||||
fn read(&self) -> Result<String, Box<dyn Error>> {
|
fn read(&self) -> Result<String, Box<dyn std::error::Error>> {
|
||||||
Err(Error::Unimplemented)
|
Err(Error::Unimplemented)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn write(&mut self, contents: String) -> Result<(), Box<dyn Error>> {
|
fn write(
|
||||||
|
&mut self,
|
||||||
|
contents: String,
|
||||||
|
) -> Result<(), Box<dyn std::error::Error>> {
|
||||||
Err(Error::Unimplemented)
|
Err(Error::Unimplemented)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue