Remove get_ prefix on getters

Part of #6224

I certainly didn't remove all of them; I avoided `unsafe` areas and also `components/script`
This commit is contained in:
Corey Farwell 2015-05-31 12:45:04 -04:00
parent c63fc4dc13
commit 435e551753
21 changed files with 62 additions and 70 deletions

View file

@ -10,13 +10,13 @@ use std::sync::mpsc::channel;
pub trait ClipboardProvider {
// blocking method to get the clipboard contents
fn get_clipboard_contents(&mut self) -> String;
fn clipboard_contents(&mut self) -> String;
// blocking method to set the clipboard contents
fn set_clipboard_contents(&mut self, &str);
}
impl ClipboardProvider for ConstellationChan {
fn get_clipboard_contents(&mut self) -> String {
fn clipboard_contents(&mut self) -> String {
let (tx, rx) = channel();
self.0.send(ConstellationMsg::GetClipboardContents(tx)).unwrap();
rx.recv().unwrap()
@ -39,7 +39,7 @@ impl DummyClipboardContext {
}
impl ClipboardProvider for DummyClipboardContext {
fn get_clipboard_contents(&mut self) -> String {
fn clipboard_contents(&mut self) -> String {
self.content.clone()
}
fn set_clipboard_contents(&mut self, s: &str) {

View file

@ -315,7 +315,7 @@ impl<T: ClipboardProvider> TextInput<T> {
KeyReaction::Nothing
},
Key::V if is_control_key(mods) => {
let contents = self.clipboard_provider.get_clipboard_contents();
let contents = self.clipboard_provider.clipboard_contents();
self.insert_string(&contents);
KeyReaction::DispatchInput
},