aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorReiner Herrmann <reiner@reiner-h.de>2019-03-02 18:29:45 +0100
committerReiner Herrmann <reiner@reiner-h.de>2019-03-02 18:29:45 +0100
commit65bf28fbfcd91f430a8f3d1dbf669d7c398aac50 (patch)
tree204da243d4289ec57449f80facee167922fd104c /src
parent644b518e10f17e6360af088794c6fb710c7e7ce4 (diff)
Move main tftp module into lib to be used as crate
Otherwise compiler throws warnings about unused symbols, if not every public function is used in every module importing it.
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs (renamed from src/tftp.rs)0
-rw-r--r--src/tftpc.rs6
-rw-r--r--src/tftpd.rs6
3 files changed, 6 insertions, 6 deletions
diff --git a/src/tftp.rs b/src/lib.rs
index b1ff232..b1ff232 100644
--- a/src/tftp.rs
+++ b/src/lib.rs
diff --git a/src/tftpc.rs b/src/tftpc.rs
index 3283f41..15cadc3 100644
--- a/src/tftpc.rs
+++ b/src/tftpc.rs
@@ -14,7 +14,7 @@ use std::os::unix::ffi::OsStrExt; /* for converting filename into bytes */
extern crate getopts;
use getopts::Options;
-mod tftp;
+extern crate rtftp;
enum Mode {
RRQ,
@@ -28,14 +28,14 @@ struct Configuration {
}
struct Tftpc {
- tftp: tftp::Tftp,
+ tftp: rtftp::Tftp,
conf: Configuration,
}
impl Tftpc {
pub fn new(conf: Configuration) -> Tftpc {
Tftpc {
- tftp: tftp::Tftp::new(),
+ tftp: rtftp::Tftp::new(),
conf: conf,
}
}
diff --git a/src/tftpd.rs b/src/tftpd.rs
index ce108de..4773664 100644
--- a/src/tftpd.rs
+++ b/src/tftpd.rs
@@ -18,7 +18,7 @@ use nix::unistd::{Gid,Uid,setresgid,setresuid};
extern crate getopts;
use getopts::Options;
-mod tftp;
+extern crate rtftp;
struct Configuration {
port: u16,
@@ -30,14 +30,14 @@ struct Configuration {
}
struct Tftpd {
- tftp: tftp::Tftp,
+ tftp: rtftp::Tftp,
conf: Configuration,
}
impl Tftpd {
pub fn new(conf: Configuration) -> Tftpd {
Tftpd{
- tftp: tftp::Tftp::new(),
+ tftp: rtftp::Tftp::new(),
conf: conf,
}
}