Reformat project
This commit is contained in:
parent
1d760a2415
commit
3c12e3ff29
@ -8,7 +8,8 @@ fn main() -> Result<(), String> {
|
||||
let out_dir = env::var_os("TRUNK_STAGING_DIR").unwrap_or("target/default_configs".into());
|
||||
fs::create_dir_all(&out_dir).map_err(|e| format!("failed to create target directory: {e}"))?;
|
||||
|
||||
create_default_config::<SessionConfig, _>("session_config", &out_dir).map_err(|e| format!("Failed to create session_config: {e}"))?;
|
||||
create_default_config::<SessionConfig, _>("session_config", &out_dir)
|
||||
.map_err(|e| format!("Failed to create session_config: {e}"))?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
@ -6,7 +6,9 @@ use serde::{Deserialize, Serialize};
|
||||
use session_iter::day::Day;
|
||||
use session_iter::session::iter::{DatedSession, DatedSessionIter};
|
||||
use session_iter::session::rule::WeekdayOfMonth;
|
||||
use session_iter::session::{Alternation, Cancellation, Dated, ExtraSession, RegularSession, Session, WithNote};
|
||||
use session_iter::session::{
|
||||
Alternation, Cancellation, Dated, ExtraSession, RegularSession, Session, WithNote,
|
||||
};
|
||||
|
||||
#[component]
|
||||
pub fn App() -> impl IntoView {
|
||||
@ -188,7 +190,12 @@ impl Default for SessionConfig {
|
||||
.except(
|
||||
NEXT_SUN_SESSION,
|
||||
Alternation {
|
||||
new_day: Some(NEXT_SUN_SESSION.checked_sub_days(Days::new(1)).unwrap().into()),
|
||||
new_day: Some(
|
||||
NEXT_SUN_SESSION
|
||||
.checked_sub_days(Days::new(1))
|
||||
.unwrap()
|
||||
.into(),
|
||||
),
|
||||
..Default::default()
|
||||
},
|
||||
)
|
||||
|
||||
@ -2,4 +2,3 @@ pub mod day;
|
||||
pub mod session;
|
||||
#[cfg(test)]
|
||||
mod test_util;
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ impl DatedSessionIter {
|
||||
pub fn new<D, S>(start_date: D, sessions: S) -> DatedSessionIter
|
||||
where
|
||||
D: Into<Day>,
|
||||
S: IntoIterator<Item=Session>,
|
||||
S: IntoIterator<Item = Session>,
|
||||
{
|
||||
let current_date = start_date.into();
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ pub struct SessionDayIter<R> {
|
||||
|
||||
impl<R, S> Iterator for SessionDayIter<R>
|
||||
where
|
||||
R: Deref<Target=S>,
|
||||
R: Deref<Target = S>,
|
||||
S: SessionRuleLike,
|
||||
{
|
||||
type Item = Day;
|
||||
@ -67,7 +67,7 @@ where
|
||||
|
||||
impl<R> SessionDayIter<R>
|
||||
where
|
||||
R: Deref<Target=SessionRule>,
|
||||
R: Deref<Target = SessionRule>,
|
||||
{
|
||||
pub fn to_owned(&self) -> SessionDayIter<SessionRule> {
|
||||
SessionDayIter {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user