66<%
77 from util import (new_context, rust_comment, rust_doc_comment, rust_module_doc_comment,
88 rb_type, hub_type, mangle_ident, hub_type_params_s, hub_type_bounds,
9- rb_type_params_s, find_fattest_resource, HUB_TYPE_PARAMETERS , METHODS_RESOURCE )
9+ rb_type_params_s, find_fattest_resource, HUB_TYPE_PARAMETERS , METHODS_RESOURCE ,
10+ UNUSED_TYPE_MARKER , schema_markers)
1011
1112 c = new_context(schemas, resources, context.get(' methods' ))
1213 hub_type = hub_type(c.schemas, util.canonical_name())
2122<%block filter =" rust_module_doc_comment" > \
2223${ lib.docs(c)}
2324</%block >
24- # ![feature(core,io, old_io)]
25- // DEBUG !! TODO: Remove this
26- # ![allow(dead_code, deprecated)]
25+ # ![feature(core,io,thread_sleep)]
26+ // Unused attributes happen thanks to defined, but unused structures
2727// We don't warn about this, as depending on the API, some data structures or facilities are never used.
2828// Instead of pre-determining this, we just disable the lint. It's manually tuned to not have any
2929// unused imports in fully featured APIs. Same with unused_mut ... .
@@ -49,9 +49,9 @@ use std::marker::PhantomData;
4949use serde::json;
5050use std::io;
5151use std::fs;
52- use std::old_io::timer ::sleep;
52+ use std::thread ::sleep;
5353
54- pub use cmn::{MultiPartReader, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, UnusedType };
54+ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate};
5555
5656
5757// ##############
@@ -119,7 +119,9 @@ impl<'a, ${', '.join(HUB_TYPE_PARAMETERS)}> ${hub_type}${ht_params}
119119// SCHEMAS ###
120120// ##########
121121% for s in c.schemas.values():
122+ % if UNUSED_TYPE_MARKER not in schema_markers(s, c, transitive = True ):
122123${ schema.new(s, c)}
124+ % endif
123125% endfor
124126% endif
125127
0 commit comments