Clean up source commenting

This commit is contained in:
James 2018-08-03 21:52:31 +10:00
parent cab17e6832
commit a46e911ea0
9 changed files with 37 additions and 23 deletions

View File

@ -1,4 +1,5 @@
/// Serves static files from a asset directory. //! Serves static files from a asset directory.
extern crate mime_guess; extern crate mime_guess;
use assets::mime_guess::{get_mime_type, octet_stream}; use assets::mime_guess::{get_mime_type, octet_stream};

View File

@ -1,6 +1,7 @@
/// config.rs //! config.rs
/// //!
/// Contains Config structures, as well as means of serialising them. //! Contains Config structures, as well as means of serialising them.
use toml; use toml;
use toml::de::Error as TomlError; use toml::de::Error as TomlError;

View File

@ -1,6 +1,7 @@
/// http.rs //! http.rs
/// //!
/// A simple wrapper around Hyper's HTTP client. //! A simple wrapper around Hyper's HTTP client.
use hyper::header::ContentLength; use hyper::header::ContentLength;
use reqwest; use reqwest;

View File

@ -1,6 +1,7 @@
/// installer.rs //! installer.rs
/// //!
/// Contains the main installer structure, as well as high-level means of controlling it. //! Contains the main installer structure, as well as high-level means of controlling it.
use serde_json; use serde_json;
use std::fs::File; use std::fs::File;

View File

@ -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"] #![windows_subsystem = "windows"]
#[cfg(windows)] #[cfg(windows)]
@ -7,6 +12,7 @@ extern crate web_view;
extern crate futures; extern crate futures;
extern crate hyper; extern crate hyper;
extern crate url;
extern crate number_prefix; extern crate number_prefix;
extern crate reqwest; extern crate reqwest;

View File

@ -1,8 +1,7 @@
/// rest.rs //! rest.rs
/// //!
/// Provides a HTTP/REST server for both frontend<->backend communication, as well //! Provides a HTTP/REST server for both frontend<->backend communication, as well
/// as talking to external applications. //! as talking to external applications.
extern crate url;
use serde_json; use serde_json;
@ -15,7 +14,7 @@ use hyper::header::{ContentLength, ContentType};
use hyper::server::{Http, Request, Response, Service}; use hyper::server::{Http, Request, Response, Service};
use hyper::{self, Error as HyperError, Get, Post, StatusCode}; use hyper::{self, Error as HyperError, Get, Post, StatusCode};
use self::url::form_urlencoded; use url::form_urlencoded;
use std::collections::HashMap; use std::collections::HashMap;
use std::net::{IpAddr, Ipv4Addr, SocketAddr}; use std::net::{IpAddr, Ipv4Addr, SocketAddr};

View File

@ -1,4 +1,7 @@
/// github/mod.rs //! github/mod.rs
//!
//! Contains the Github API implementation of a release source.
use reqwest; use reqwest;
use reqwest::header::UserAgent; use reqwest::header::UserAgent;
use reqwest::StatusCode; use reqwest::StatusCode;

View File

@ -1,6 +1,7 @@
/// sources/mod.rs //! sources/mod.rs
/// //!
/// Contains backends to various release distribution services. //! Contains backends to various release distribution services.
pub mod types; pub mod types;
pub mod github; pub mod github;

View File

@ -1,6 +1,7 @@
/// types.rs //! types.rs
/// //!
/// Contains traits that should be implemented by sources, as well as corresponding types. //! Contains traits that should be implemented by sources, as well as corresponding types.
use std::cmp::Ordering; use std::cmp::Ordering;
pub use semver::Version as SemverVersion; pub use semver::Version as SemverVersion;