Clean up typos in source

This commit is contained in:
James 2018-08-04 22:18:12 +10:00
parent 25bd35fa8d
commit c0387c9a0a
3 changed files with 9 additions and 9 deletions

View File

@ -84,7 +84,7 @@ impl Service for WebService {
.read() .read()
.log_expect("InstallerFramework has been dirtied"); .log_expect("InstallerFramework has been dirtied");
let file = enscapsulate_json( let file = encapsulate_json(
"config", "config",
&framework &framework
.get_config() .get_config()
@ -104,7 +104,7 @@ impl Service for WebService {
.read() .read()
.log_expect("InstallerFramework has been dirtied"); .log_expect("InstallerFramework has been dirtied");
let file = enscapsulate_json( let file = encapsulate_json(
"packages", "packages",
&serde_json::to_string(&framework.database) &serde_json::to_string(&framework.database)
.log_expect("Failed to render JSON representation of database"), .log_expect("Failed to render JSON representation of database"),
@ -187,7 +187,7 @@ impl Service for WebService {
loop { loop {
let response = receiver let response = receiver
.recv() .recv()
.log_expect("Failed to recieve message from runner thread"); .log_expect("Failed to receive message from runner thread");
if let InstallMessage::EOF = response { if let InstallMessage::EOF = response {
break; break;
@ -254,9 +254,9 @@ impl Service for WebService {
} }
if let Err(v) = framework.install(to_install, &sender, new_install) { if let Err(v) = framework.install(to_install, &sender, new_install) {
error!("Uninstall error occurred: {:?}", v); error!("Install error occurred: {:?}", v);
if let Err(v) = sender.send(InstallMessage::Error(v)) { if let Err(v) = sender.send(InstallMessage::Error(v)) {
error!("Failed to send uninstall error: {:?}", v); error!("Failed to send install error: {:?}", v);
} }
} }
@ -271,7 +271,7 @@ impl Service for WebService {
loop { loop {
let response = receiver let response = receiver
.recv() .recv()
.log_expect("Failed to recieve message from runner thread"); .log_expect("Failed to receive message from runner thread");
if let InstallMessage::EOF = response { if let InstallMessage::EOF = response {
break; break;
@ -323,6 +323,6 @@ impl Service for WebService {
} }
/// Encapsulates JSON as a injectable Javascript script. /// Encapsulates JSON as a injectable Javascript script.
fn enscapsulate_json(field_name: &str, json: &str) -> String { fn encapsulate_json(field_name: &str, json: &str) -> String {
format!("var {} = {};", field_name, json) format!("var {} = {};", field_name, json)
} }

View File

@ -19,7 +19,7 @@ pub mod save_executable;
pub mod uninstall; pub mod uninstall;
pub mod uninstall_pkg; pub mod uninstall_pkg;
/// An abstraction over the various paramaters that can be passed around. /// An abstraction over the various parameters that can be passed around.
pub enum TaskParamType { pub enum TaskParamType {
None, None,
/// Metadata about a file /// Metadata about a file

View File

@ -53,7 +53,7 @@ function ajax(path, successCallback, failCallback, data) {
/** /**
* Makes a AJAX request, streaming each line as it arrives. Type should be text/plain, * Makes a AJAX request, streaming each line as it arrives. Type should be text/plain,
* each line will be interpeted as JSON seperately. * each line will be interpreted as JSON separately.
* *
* @param path The path to connect to. * @param path The path to connect to.
* @param callback A callback with a JSON payload. Called for every line as it comes. * @param callback A callback with a JSON payload. Called for every line as it comes.