Skip to content

Commit

Permalink
GlobalState: Now using auto-generated Default.
Browse files Browse the repository at this point in the history
  • Loading branch information
martinfrances107 committed Jun 26, 2024
1 parent 086b91e commit 2321a5f
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions src/pages/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cfg_if! {
#[derive(Debug)]
pub(crate) struct DirectorySetError{}

#[derive(Clone, Debug)]
#[derive(Clone, Debug, Default)]
pub(crate) struct GlobalState {
pub entries: Vec<SRElem>,
pub index: Index,
Expand All @@ -41,24 +41,6 @@ cfg_if! {
selected_dir: PathBuf,
}

impl Default for GlobalState {
fn default() -> Self {
// Initialisation value required for the period before initialisation
// from command line arguments.
let root_dir = PathBuf::from("../exif-samples") ;

Self {
container_dir: root_dir.clone(),
index: Index::new(root_dir.clone(), root_dir.clone()),
query: vec![],
entries: vec![],
list_dir: root_dir.clone(),
metadata: None,
selected_dir: root_dir,
}
}
}

impl GlobalState {
// Reject urls without a prefix "/images"
// Reject invalid DIRECTORY names ( within the container directory ).
Expand Down

0 comments on commit 2321a5f

Please sign in to comment.