summaryrefslogtreecommitdiff
path: root/src/utils.rs
diff options
context:
space:
mode:
authorFredrik Meringdal <fmeringdal@hotmail.com>2020-11-03 23:22:51 +0100
committerFredrik Meringdal <fmeringdal@hotmail.com>2020-11-03 23:22:51 +0100
commit00ba4141d5bb41f0ffc014c76bfdafcec7c02b6b (patch)
tree682f9f09ff13849a455d01ea7949a5c4a581663d /src/utils.rs
parent66317f2566897556488af09e9ca73a06b9439b0f (diff)
downloadrust_rrule-00ba4141d5bb41f0ffc014c76bfdafcec7c02b6b.zip
using lazy_static instead of once_cell
Diffstat (limited to 'src/utils.rs')
-rw-r--r--src/utils.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/utils.rs b/src/utils.rs
index d19ca90..f5451ba 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -25,13 +25,12 @@ pub fn not_empty<T>(v: &Vec<T>) -> bool {
!v.is_empty()
}
-
#[cfg(test)]
mod test {
use super::*;
#[test]
- fn python_mod(){
+ fn python_mod() {
assert_eq!(pymod(2, -3), -1);
assert_eq!(pymod(-2, 3), 1);
assert_eq!(pymod(-2, -3), -2);
@@ -47,7 +46,7 @@ mod test {
}
#[test]
- fn includes_works(){
+ fn includes_works() {
assert!(!includes(&vec![], &0));
assert!(includes(&vec![1], &1));
assert!(includes(&vec![1, 2, 3, 4], &3));
@@ -55,8 +54,8 @@ mod test {
}
#[test]
- fn not_empty_works(){
+ fn not_empty_works() {
assert!(!not_empty::<usize>(&vec![]));
assert!(not_empty(&vec![1]));
}
-} \ No newline at end of file
+}