diff --git a/src/assets.rs b/src/assets.rs index 81b514b..5182fb5 100644 --- a/src/assets.rs +++ b/src/assets.rs @@ -1,4 +1,5 @@ -/// Serves static files from a asset directory. +//! Serves static files from a asset directory. + extern crate mime_guess; use assets::mime_guess::{get_mime_type, octet_stream}; diff --git a/src/config.rs b/src/config.rs index 66cd79f..8f1a17c 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,6 +1,7 @@ -/// config.rs -/// -/// Contains Config structures, as well as means of serialising them. +//! config.rs +//! +//! Contains Config structures, as well as means of serialising them. + use toml; use toml::de::Error as TomlError; diff --git a/src/http.rs b/src/http.rs index 2c5d1e3..b63afe4 100644 --- a/src/http.rs +++ b/src/http.rs @@ -1,6 +1,7 @@ -/// http.rs -/// -/// A simple wrapper around Hyper's HTTP client. +//! http.rs +//! +//! A simple wrapper around Hyper's HTTP client. + use hyper::header::ContentLength; use reqwest; diff --git a/src/installer.rs b/src/installer.rs index da0176e..1193ffe 100644 --- a/src/installer.rs +++ b/src/installer.rs @@ -1,6 +1,7 @@ -/// installer.rs -/// -/// Contains the main installer structure, as well as high-level means of controlling it. +//! installer.rs +//! +//! Contains the main installer structure, as well as high-level means of controlling it. + use serde_json; use std::fs::File; diff --git a/src/main.rs b/src/main.rs index 867f56f..2917922 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,8 @@ +//! main.rs +//! +//! The main entrypoint for the application. Orchestrates the building of the installation +//! framework, and opens necessary HTTP servers/frontends. + #![windows_subsystem = "windows"] #[cfg(windows)] @@ -7,6 +12,7 @@ extern crate web_view; extern crate futures; extern crate hyper; +extern crate url; extern crate number_prefix; extern crate reqwest; diff --git a/src/rest.rs b/src/rest.rs index 8ea85f1..c722002 100644 --- a/src/rest.rs +++ b/src/rest.rs @@ -1,8 +1,7 @@ -/// rest.rs -/// -/// Provides a HTTP/REST server for both frontend<->backend communication, as well -/// as talking to external applications. -extern crate url; +//! rest.rs +//! +//! Provides a HTTP/REST server for both frontend<->backend communication, as well +//! as talking to external applications. use serde_json; @@ -15,7 +14,7 @@ use hyper::header::{ContentLength, ContentType}; use hyper::server::{Http, Request, Response, Service}; use hyper::{self, Error as HyperError, Get, Post, StatusCode}; -use self::url::form_urlencoded; +use url::form_urlencoded; use std::collections::HashMap; use std::net::{IpAddr, Ipv4Addr, SocketAddr}; diff --git a/src/sources/github/mod.rs b/src/sources/github/mod.rs index 7d5a005..5858f08 100644 --- a/src/sources/github/mod.rs +++ b/src/sources/github/mod.rs @@ -1,4 +1,7 @@ -/// github/mod.rs +//! github/mod.rs +//! +//! Contains the Github API implementation of a release source. + use reqwest; use reqwest::header::UserAgent; use reqwest::StatusCode; diff --git a/src/sources/mod.rs b/src/sources/mod.rs index 857462d..08e6a71 100644 --- a/src/sources/mod.rs +++ b/src/sources/mod.rs @@ -1,6 +1,7 @@ -/// sources/mod.rs -/// -/// Contains backends to various release distribution services. +//! sources/mod.rs +//! +//! Contains backends to various release distribution services. + pub mod types; pub mod github; diff --git a/src/sources/types.rs b/src/sources/types.rs index cc3c0d5..cddbf37 100644 --- a/src/sources/types.rs +++ b/src/sources/types.rs @@ -1,6 +1,7 @@ -/// types.rs -/// -/// Contains traits that should be implemented by sources, as well as corresponding types. +//! types.rs +//! +//! Contains traits that should be implemented by sources, as well as corresponding types. + use std::cmp::Ordering; pub use semver::Version as SemverVersion;