Skip to content

Commit

Permalink
Next iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
Veetaha committed Sep 21, 2024
1 parent ea284b4 commit 99ff6a9
Show file tree
Hide file tree
Showing 17 changed files with 838 additions and 825 deletions.
12 changes: 0 additions & 12 deletions bon-macros/src/builder/builder_gen/member/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use crate::util::prelude::*;
use darling::util::SpannedValue;
use darling::FromAttributes;
use params::MemberParams;
use quote::quote;
use std::fmt;

#[derive(Debug, Clone, Copy)]
Expand Down Expand Up @@ -188,17 +187,6 @@ impl NamedMember {
self.as_optional_norm_ty().is_some()
}

/// The type parameter for the `Set<T>` type that corresponds to this member
pub(crate) fn set_state_type_param(&self) -> TokenStream2 {
let ty = &self.norm_ty;
let ty = self
.as_optional_norm_ty()
.map(|ty| quote!(Option<#ty>))
.unwrap_or_else(|| quote!(#ty));

quote!(#ty)
}

pub(crate) fn param_default(&self) -> Option<Option<&syn::Expr>> {
self.params
.default
Expand Down
Loading

0 comments on commit 99ff6a9

Please sign in to comment.