mirror of
https://github.com/kmc7468/cs220.git
synced 2025-12-14 22:18:46 +00:00
Correct minor typos (#14)
* fix: Correct minor typo - relase -> release * fix: Correct minor typos - farenheit, farhenheit -> fahrenheit - celcius -> celsius * fix: Correct minor typo - sume -> sum
This commit is contained in:
@@ -71,7 +71,7 @@ _run_tests_with() {
|
|||||||
# example: run_tests
|
# example: run_tests
|
||||||
# Uses global variable RUNNER and TESTS
|
# Uses global variable RUNNER and TESTS
|
||||||
run_tests() {
|
run_tests() {
|
||||||
# "cargo --relase" should be split into "cargo" and "--release"
|
# "cargo --release" should be split into "cargo" and "--release"
|
||||||
local IFS=' '
|
local IFS=' '
|
||||||
echo $(_run_tests_with $RUNNER)
|
echo $(_run_tests_with $RUNNER)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,11 +8,11 @@
|
|||||||
|
|
||||||
use std::ops::Mul;
|
use std::ops::Mul;
|
||||||
|
|
||||||
const FARHENHEIT_OFFSET: f64 = 32.0;
|
const FAHRENHEIT_OFFSET: f64 = 32.0;
|
||||||
const FARHENHEIT_SCALE: f64 = 5.0 / 9.0;
|
const FAHRENHEIT_SCALE: f64 = 5.0 / 9.0;
|
||||||
|
|
||||||
/// Converts Farenheit to Celcius temperature degree.
|
/// Converts Fahrenheit to Celsius temperature degree.
|
||||||
pub(crate) fn farhenheit_to_celcius(degree: f64) -> f64 {
|
pub(crate) fn fahrenheit_to_celsius(degree: f64) -> f64 {
|
||||||
todo!()
|
todo!()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ pub(crate) fn capitalize(input: String) -> String {
|
|||||||
todo!()
|
todo!()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the sume of the given array. (We assume the absence of integer overflow.)
|
/// Returns the sum of the given array. (We assume the absence of integer overflow.)
|
||||||
pub(crate) fn sum_array(input: &[u64]) -> u64 {
|
pub(crate) fn sum_array(input: &[u64]) -> u64 {
|
||||||
todo!()
|
todo!()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ mod test {
|
|||||||
use super::super::assignment02::*;
|
use super::super::assignment02::*;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_farenheit() {
|
fn test_fahrenheit() {
|
||||||
assert_eq!(farhenheit_to_celcius(32.0), 0.0);
|
assert_eq!(fahrenheit_to_celsius(32.0), 0.0);
|
||||||
assert_eq!(farhenheit_to_celcius(212.0), 100.0);
|
assert_eq!(fahrenheit_to_celsius(212.0), 100.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
Reference in New Issue
Block a user