1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! Module containing various utility functions
use Path;
use iter;
/// Merges two `Vec`s.
///
/// # Examples
///
/// ```
/// let vec1 = vec![0];
/// let vec2 = vec![1];
///
/// assert_eq!(checksums::util::vec_merge(vec1, vec2), vec![0, 1]);
/// ```
/// Create a string consisting of `n` repetitions of `what`.
///
/// # Examples
///
/// ```
/// assert_eq!(checksums::util::mul_str("DIE! ", 3), "DIE! DIE! DIE! ".to_string());
/// ```
/// Create a user-usable path to `what` from `prefix`.
///
/// # Examples
///
/// ```
/// # use std::path::Path;
/// assert_eq!(checksums::util::relative_name(Path::new("/usr"), Path::new("/usr/bin/checksums")),
/// "bin/checksums".to_string());
/// ```