File tree 3 files changed +7
-5
lines changed
3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -215,10 +215,12 @@ pub(crate) fn derive_satstype(ty: &SatsType<'_>) -> TokenStream {
215
215
let mut generics = ty. generics . clone ( ) ;
216
216
add_type_bounds ( & mut generics, & quote ! ( #krate:: FilterableValue ) ) ;
217
217
let ( impl_generics, ty_generics, where_clause) = generics. split_for_impl ( ) ;
218
- // As we don't have access to other `derive` attributes,
219
- // we don't know if `Copy` was derived,
220
- // so we won't impl for the owned type.
218
+ // Assume that the type is `Copy`, as most all-unit enums will be.
221
219
let filterable_impl = quote ! {
220
+ #[ automatically_derived]
221
+ impl #impl_generics #krate:: FilterableValue for #name #ty_generics #where_clause {
222
+ type Column = #name #ty_generics;
223
+ }
222
224
#[ automatically_derived]
223
225
impl #impl_generics #krate:: FilterableValue for & #name #ty_generics #where_clause {
224
226
type Column = #name #ty_generics;
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ pub enum TermBound<T> {
87
87
}
88
88
impl < Bound : FilterableValue > TermBound < & Bound > {
89
89
#[ inline]
90
- /// If `self` is [`TermBound::Range`], returns the `rend_idx` value for [`BTreeScanArgs`] ,
90
+ /// If `self` is [`TermBound::Range`], returns the `rend_idx` value for `IndexScanRangeArgs` ,
91
91
/// i.e. the index in `buf` of the first byte in the end range
92
92
pub fn serialize_into ( & self , buf : & mut Vec < u8 > ) -> Option < usize > {
93
93
let ( start, end) = match self {
Original file line number Diff line number Diff line change @@ -550,7 +550,7 @@ define_tables! {
550
550
551
551
#[ spacetimedb:: reducer]
552
552
fn update_pk_simple_enum ( ctx : & ReducerContext , a : SimpleEnum , data : i32 ) -> anyhow:: Result < ( ) > {
553
- let Some ( mut o) = ctx. db . pk_simple_enum ( ) . a ( ) . find ( & a) else {
553
+ let Some ( mut o) = ctx. db . pk_simple_enum ( ) . a ( ) . find ( a) else {
554
554
return Err ( anyhow ! ( "row not found" ) ) ;
555
555
} ;
556
556
o. data = data;
You can’t perform that action at this time.
0 commit comments