From 0d6725d97f91064e90a7c238ac6a311c0a06ee29 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Fri, 29 Dec 2023 18:03:00 +0000 Subject: [PATCH] Spell check docs --- src/common.rs | 2 +- src/lib.rs | 10 +++++----- src/platform/linux/x11.rs | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/common.rs b/src/common.rs index 3b51c82..f115c16 100644 --- a/src/common.rs +++ b/src/common.rs @@ -50,7 +50,7 @@ pub enum Error { /// /// - When returned from `set_image`: the image going to the clipboard cannot be converted to the appropriate format. /// - When returned from `get_image`: the image coming from the clipboard could not be converted into the `ImageData` struct. - /// - When returned from `get_text`: the text coming from the clipboard is not valid utf-8 or cannot be converted to utf-8. + /// - When returned from `get_text`: the text coming from the clipboard is not valid UTF-8 or cannot be converted to UTF-8. #[error("The image or the text that was about the be transferred to/from the clipboard could not be converted to the appropriate format.")] ConversionFailure, diff --git a/src/lib.rs b/src/lib.rs index fbbd0b8..48c5750 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -56,7 +56,7 @@ pub use platform::SetExtWindows; /// The clipboard on Windows is a global object, which may only be opened on one thread at once. /// This means that `arboard` only truly opens the clipboard during each operation to ensure that /// multiple `Clipboard`'s may exist at once. This also means that attempting operations in parallel -/// has a high likelyhood to return an error instead. +/// has a high likelihood to return an error instead. #[allow(rustdoc::broken_intra_doc_links)] pub struct Clipboard { pub(crate) platform: platform::Clipboard, @@ -68,19 +68,19 @@ impl Clipboard { Ok(Clipboard { platform: platform::Clipboard::new()? }) } - /// Fetches utf-8 text from the clipboard and returns it. + /// Fetches UTF-8 text from the clipboard and returns it. pub fn get_text(&mut self) -> Result { self.get().text() } - /// Places the text onto the clipboard. Any valid utf-8 string is accepted. + /// Places the text onto the clipboard. Any valid UTF-8 string is accepted. pub fn set_text<'a, T: Into>>(&mut self, text: T) -> Result<(), Error> { self.set().text(text) } /// Places the HTML as well as a plain-text alternative onto the clipboard. /// - /// Any valid utf-8 string is accepted. + /// Any valid UTF-8 string is accepted. pub fn set_html<'a, T: Into>>( &mut self, html: T, @@ -304,7 +304,7 @@ mod tests { ctx.set_text("clipboard test").unwrap(); assert!(matches!(ctx.get_image(), Err(Error::ContentNotAvailable))); - // Test if we get the same image that we put onto the clibboard + // Test if we get the same image that we put onto the clipboard ctx.set_image(img_data.clone()).unwrap(); let got = ctx.get_image().unwrap(); assert_eq!(img_data.bytes, got.bytes); diff --git a/src/platform/linux/x11.rs b/src/platform/linux/x11.rs index c983ff1..8f3750c 100644 --- a/src/platform/linux/x11.rs +++ b/src/platform/linux/x11.rs @@ -724,7 +724,7 @@ fn serve_requests(context: Arc) -> Result<(), Box> log::trace!("Finishing clipboard manager handover."); *handover_state = ManagerHandoverState::Finished; - // Not sure if unlocking the mutext is necessary here but better safe than sorry. + // Not sure if unlocking the mutex is necessary here but better safe than sorry. drop(handover_state); clip.handover_cv.notify_all();