summaryrefslogtreecommitdiff
path: root/src/generation.rs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-12-27 15:08:50 +0200
committerLars Wirzenius <liw@liw.fi>2020-12-27 15:08:50 +0200
commit619b0471182daf42615558a4449b3156541944f8 (patch)
tree72cd3cd0a84a4e07e4da3af44764cc39fd5ae356 /src/generation.rs
parentbbde1bfd90edaa49463d7c3950ddcaa834e9ce02 (diff)
downloadobnam2-619b0471182daf42615558a4449b3156541944f8.tar.gz
refactor: rename Generation to NascentGeneration
New name is more descriptive.
Diffstat (limited to 'src/generation.rs')
-rw-r--r--src/generation.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/generation.rs b/src/generation.rs
index 875221f..32b1e73 100644
--- a/src/generation.rs
+++ b/src/generation.rs
@@ -4,12 +4,12 @@ use rusqlite::{params, Connection, OpenFlags, Row, Transaction};
use std::path::Path;
/// A backup generation.
-pub struct Generation {
+pub struct NascentGeneration {
conn: Connection,
fileno: u64,
}
-impl Generation {
+impl NascentGeneration {
pub fn create<P>(filename: P) -> anyhow::Result<Self>
where
P: AsRef<Path>,
@@ -136,14 +136,14 @@ fn find_max_fileno(conn: &Connection) -> anyhow::Result<u64> {
#[cfg(test)]
mod test {
- use super::Generation;
+ use super::NascentGeneration;
use tempfile::NamedTempFile;
#[test]
fn empty() {
let filename = NamedTempFile::new().unwrap().path().to_path_buf();
{
- let mut _gen = Generation::create(&filename).unwrap();
+ let mut _gen = NascentGeneration::create(&filename).unwrap();
// _gen is dropped here; the connection is close; the file
// should not be removed.
}