File tree Expand file tree Collapse file tree 8 files changed +44
-28
lines changed Expand file tree Collapse file tree 8 files changed +44
-28
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ where
127
127
F : FnMut ( crate :: PCSTR ) -> crate :: Result < R > ,
128
128
{
129
129
let suffix = b".dll\0 " ;
130
- let mut library = vec ! [ 0 ; path. len( ) + suffix. len( ) ] ;
130
+ let mut library = alloc :: vec![ 0 ; path. len( ) + suffix. len( ) ] ;
131
131
while let Some ( pos) = path. rfind ( '.' ) {
132
132
path = & path[ ..pos] ;
133
133
library. truncate ( path. len ( ) + suffix. len ( ) ) ;
Original file line number Diff line number Diff line change 1
- mod bindings;
1
+ #[ cfg( windows) ]
2
+ include ! ( "windows.rs" ) ;
3
+
2
4
mod can_into;
3
5
mod com_bindings;
4
- mod factory_cache;
5
- mod generic_factory;
6
6
mod ref_count;
7
7
mod sha1;
8
- mod waiter;
9
8
mod weak_ref_count;
10
9
11
- pub use bindings:: * ;
12
10
pub use can_into:: * ;
13
11
pub use com_bindings:: * ;
14
- pub use factory_cache:: * ;
15
- pub use generic_factory:: * ;
16
12
pub use ref_count:: * ;
17
13
pub use sha1:: * ;
18
- pub use waiter:: * ;
19
14
pub use weak_ref_count:: * ;
20
15
21
16
#[ doc( hidden) ]
Original file line number Diff line number Diff line change
1
+ mod factory_cache;
2
+ pub use factory_cache:: * ;
3
+
4
+ mod generic_factory;
5
+ pub use generic_factory:: * ;
6
+
7
+ mod waiter;
8
+ pub use waiter:: * ;
9
+
10
+ mod bindings;
11
+ pub use bindings:: * ;
Original file line number Diff line number Diff line change @@ -10,24 +10,21 @@ Learn more about Rust for Windows here: <https://github.com/microsoft/windows-rs
10
10
) ]
11
11
#![ cfg_attr( all( not( feature = "std" ) ) , no_std) ]
12
12
13
+ #[ cfg( windows) ]
14
+ include ! ( "windows.rs" ) ;
15
+
13
16
extern crate self as windows_core;
14
17
15
- #[ macro_use]
16
18
extern crate alloc;
17
19
18
20
use alloc:: boxed:: Box ;
19
21
20
22
#[ doc( hidden) ]
21
23
pub mod imp;
22
24
23
- mod agile_reference;
24
- mod array;
25
25
mod as_impl;
26
26
mod com_object;
27
- #[ cfg( feature = "std" ) ]
28
- mod event;
29
27
mod guid;
30
- mod handles;
31
28
mod inspectable;
32
29
mod interface;
33
30
mod out_param;
@@ -40,17 +37,11 @@ mod runtime_type;
40
37
mod scoped_interface;
41
38
mod r#type;
42
39
mod unknown;
43
- mod variant;
44
40
mod weak;
45
41
46
- pub use agile_reference:: * ;
47
- pub use array:: * ;
48
42
pub use as_impl:: * ;
49
43
pub use com_object:: * ;
50
- #[ cfg( feature = "std" ) ]
51
- pub use event:: * ;
52
44
pub use guid:: * ;
53
- pub use handles:: * ;
54
45
pub use inspectable:: * ;
55
46
pub use interface:: * ;
56
47
pub use out_param:: * ;
@@ -63,15 +54,8 @@ pub use runtime_name::*;
63
54
pub use runtime_type:: * ;
64
55
pub use scoped_interface:: * ;
65
56
pub use unknown:: * ;
66
- pub use variant:: * ;
67
57
pub use weak:: * ;
68
58
pub use windows_implement:: implement;
69
59
pub use windows_interface:: interface;
70
60
pub use windows_result:: * ;
71
61
pub use windows_strings:: * ;
72
-
73
- /// Attempts to load the factory object for the given WinRT class.
74
- /// This can be used to access COM interfaces implemented on a Windows Runtime class factory.
75
- pub fn factory < C : RuntimeName , I : Interface > ( ) -> Result < I > {
76
- imp:: factory :: < C , I > ( )
77
- }
Original file line number Diff line number Diff line change
1
+ mod agile_reference;
2
+ pub use agile_reference:: * ;
3
+
4
+ mod array;
5
+ pub use array:: * ;
6
+
7
+ #[ cfg( feature = "std" ) ]
8
+ mod event;
9
+ #[ cfg( feature = "std" ) ]
10
+ pub use event:: * ;
11
+
12
+ mod handles;
13
+ pub use handles:: * ;
14
+
15
+ mod variant;
16
+ pub use variant:: * ;
17
+
18
+ /// Attempts to load the factory object for the given WinRT class.
19
+ /// This can be used to access COM interfaces implemented on a Windows Runtime class factory.
20
+ pub fn factory < C : RuntimeName , I : Interface > ( ) -> Result < I > {
21
+ imp:: factory :: < C , I > ( )
22
+ }
Original file line number Diff line number Diff line change 2
2
Learn more about Rust for Windows here: <https://github.com/microsoft/windows-rs>
3
3
*/
4
4
5
+ #![ cfg( windows) ]
6
+
5
7
const VERSION : & str = "2.0.240405.15" ;
6
8
7
9
/// Calls the C++/WinRT compiler with the given arguments.
Original file line number Diff line number Diff line change 2
2
Learn more about Rust for Windows here: <https://github.com/microsoft/windows-rs>
3
3
*/
4
4
5
+ #![ cfg( windows) ]
5
6
#![ no_std]
6
7
7
8
#[ macro_use]
Original file line number Diff line number Diff line change 2
2
Learn more about Rust for Windows here: <https://github.com/microsoft/windows-rs>
3
3
*/
4
4
5
+ #![ cfg( windows) ]
5
6
#![ cfg_attr( not( test) , no_std) ]
6
7
7
8
mod bindings;
You can’t perform that action at this time.
0 commit comments