File tree Expand file tree Collapse file tree 1 file changed +16
-11
lines changed
git-function-history-lib/src Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change
1
+ use std:: error:: Error ;
2
+
1
3
pub fn empty_test ( ) {
2
4
3
5
}
@@ -40,7 +42,6 @@ impl<a>Test<a> {
40
42
}
41
43
42
44
pub fn test_in_test_in_test ( ) {
43
- #[ derive( Debug ) ]
44
45
pub fn empty_test ( ) {
45
46
46
47
}
63
64
fn empty_test < T > ( ) -> String where T : super_trait {
64
65
String :: from ( "fn empty_test() " ) ;
65
66
fn broken ( ) {
66
- r#"#"}"#
67
+ r#"#"}"# ;
67
68
}
69
+ String :: from ( "fn empty_test() " )
68
70
}
69
71
70
72
}
@@ -92,11 +94,17 @@ extern "C" {
92
94
fn abs ( input : i32 ) -> i32 ;
93
95
}
94
96
95
- pub fn function_within ( t : String ) -> i32 {
97
+ /// function why inner doc comments no worky
98
+ pub fn function_within ( t : String ) -> Result < i32 , Box < dyn Error > > {
96
99
//! function within
97
- pub fn empty_test ( t : String ) -> i32 {
100
+ pub fn empty_test ( t : String ) -> Result < i32 , Box < dyn Error > > {
98
101
println ! ( "empty test" ) ;
99
- t. parse ( )
102
+ match t. parse :: < i32 > ( ) {
103
+ Ok ( i) => Ok ( i) ,
104
+ Err ( e) => Err ( e) ?,
105
+
106
+
107
+ }
100
108
}
101
109
empty_test ( t)
102
110
}
@@ -115,10 +123,7 @@ where T: super_trait {
115
123
116
124
}
117
125
118
- #[ derive( Debug ) ]
119
- extern {
120
- pub fn empty_test ( t : String ) -> i32 {
121
- println ! ( "empty test" ) ;
122
- t. parse ( )
123
- }
126
+
127
+ extern "C" {
128
+ pub fn empty_test ( t : String ) ;
124
129
}
You can’t perform that action at this time.
0 commit comments