pinecone_client/lib.rs
1//! # Pinecone Client
2//!
3//! `pinecone_client` is a collection of utilities to make performing certain
4//! calculations more convenient.
5
6/// Adds one to the number given.
7// --snip--
8
9/// Adds one to the number given.
10///
11/// # Examples
12///
13/// ```
14/// let five = 5;
15///
16/// assert_eq!(6, pinecone_client::add_one(5));
17/// ```
18pub fn add_one(x: i32) -> i32 {
19 x + 1
20}
21
22#[cfg(test)]
23mod tests {
24 use super::*;
25
26 #[test]
27 fn it_works() {
28 let result = add_one(2);
29 assert_eq!(result, 3);
30 }
31}