aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/filemanager_thread.rs
diff options
context:
space:
mode:
authorZhen Zhang <izgzhen@gmail.com>2016-05-18 00:07:42 +0800
committerZhen Zhang <izgzhen@gmail.com>2016-05-20 08:00:16 +0800
commita51db4cfa857d7567ce1078830f5c00ea7bd9f59 (patch)
tree9a604ff41983c9bded331f4ec80f94c9f6b1cd45 /components/net/filemanager_thread.rs
parent051a749e0d0ff298a3cbce8c6284386dc0d67f24 (diff)
downloadservo-a51db4cfa857d7567ce1078830f5c00ea7bd9f59.tar.gz
servo-a51db4cfa857d7567ce1078830f5c00ea7bd9f59.zip
Implement trait-based ResourceThreads and clean up related naming issues
Changes include: - Introduce an IpcSend trait to abstract over a collection of IpcSenders - Implement ResourceThreads collection to abstract the resource-related sub threads across the component - Rename original ResourceThread and ControlMsg into an unifed CoreResource__ to accommodate above changes and avoid confusions
Diffstat (limited to 'components/net/filemanager_thread.rs')
-rw-r--r--components/net/filemanager_thread.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/net/filemanager_thread.rs b/components/net/filemanager_thread.rs
index 04a19a3a3d6..83695434328 100644
--- a/components/net/filemanager_thread.rs
+++ b/components/net/filemanager_thread.rs
@@ -18,7 +18,7 @@ pub struct FileManager {
}
impl FileManager {
- pub fn new(recv: IpcReceiver<FileManagerThreadMsg>) -> FileManager {
+ fn new(recv: IpcReceiver<FileManagerThreadMsg>) -> FileManager {
FileManager {
receiver: recv,
idmap: RefCell::new(HashMap::new()),
@@ -36,7 +36,7 @@ impl FileManager {
}
/// Start the file manager event loop
- pub fn start(&mut self) {
+ fn start(&mut self) {
loop {
match self.receiver.recv().unwrap() {
FileManagerThreadMsg::SelectFile(sender) => self.select_file(sender),