@@ -4,12 +4,6 @@ use core::marker::PhantomData;
44use core:: mem;
55use core:: ptr:: null;
66
7- #[ cfg( feature = "alloc" ) ]
8- extern crate alloc;
9-
10- #[ cfg( feature = "alloc" ) ]
11- use alloc:: boxed:: Box ;
12-
137use super :: characteristic:: { self , AttributeMetadata , Presentation } ;
148use super :: { CharacteristicHandles , DescriptorHandle , IncludedServiceHandle , RegisterError , ServiceHandle } ;
159use crate :: ble:: Uuid ;
@@ -54,18 +48,6 @@ impl<'a> ServiceBuilder<'a> {
5448 self . add_characteristic_inner ( uuid, value, attr. max_len , & attr_md, md)
5549 }
5650
57- #[ cfg( feature = "alloc" ) ]
58- pub fn add_characteristic_app (
59- & mut self ,
60- uuid : Uuid ,
61- attr : characteristic:: Attribute < Box < [ u8 ] > > ,
62- md : characteristic:: Metadata ,
63- ) -> Result < CharacteristicBuilder < ' _ > , RegisterError > {
64- let value = Box :: leak ( attr. value ) ;
65- let attr_md = attr. metadata . into_raw_user ( ) ;
66- self . add_characteristic_inner ( uuid, value, attr. max_len , & attr_md, md)
67- }
68-
6951 fn add_characteristic_inner (
7052 & mut self ,
7153 uuid : Uuid ,
@@ -152,17 +134,6 @@ impl<'a> CharacteristicBuilder<'a> {
152134 self . add_descriptor_inner ( uuid, value, attr. max_len , & attr_md)
153135 }
154136
155- #[ cfg( feature = "alloc" ) ]
156- pub fn add_descriptor_app (
157- & mut self ,
158- uuid : Uuid ,
159- attr : characteristic:: Attribute < Box < [ u8 ] > > ,
160- ) -> Result < DescriptorHandle , RegisterError > {
161- let value = Box :: leak ( attr. value ) ;
162- let attr_md = attr. metadata . into_raw_user ( ) ;
163- self . add_descriptor_inner ( uuid, value, attr. max_len , & attr_md)
164- }
165-
166137 fn add_descriptor_inner (
167138 & mut self ,
168139 uuid : Uuid ,
0 commit comments