@@ -71,7 +71,6 @@ impl<'a> From<Vec<(&'a str, &'a str)>> for MenuentryBody<'a> {
71
71
72
72
/// A complete GRUB menuentry with title and body commands.
73
73
#[ derive( Debug , PartialEq , Eq ) ]
74
- #[ allow( dead_code) ]
75
74
pub ( crate ) struct MenuEntry < ' a > {
76
75
/// Display title (supports escaped quotes)
77
76
pub ( crate ) title : & ' a str ,
@@ -88,8 +87,7 @@ impl<'a> Display for MenuEntry<'a> {
88
87
}
89
88
90
89
/// Parser that takes content until balanced brackets, handling nested brackets and escapes.
91
- #[ allow( dead_code) ]
92
- pub fn take_until_balanced_allow_nested (
90
+ fn take_until_balanced_allow_nested (
93
91
opening_bracket : char ,
94
92
closing_bracket : char ,
95
93
) -> impl Fn ( & str ) -> IResult < & str , & str > {
@@ -141,7 +139,6 @@ pub fn take_until_balanced_allow_nested(
141
139
}
142
140
143
141
/// Parses a single menuentry with title and body commands.
144
- #[ allow( dead_code) ]
145
142
fn parse_menuentry ( input : & str ) -> IResult < & str , MenuEntry < ' _ > > {
146
143
let ( input, _) = tag ( "menuentry" ) . parse ( input) ?;
147
144
@@ -190,14 +187,12 @@ fn parse_menuentry(input: &str) -> IResult<&str, MenuEntry<'_>> {
190
187
}
191
188
192
189
/// Skips content until finding "menuentry" keyword or end of input.
193
- #[ allow( dead_code) ]
194
190
fn skip_to_menuentry ( input : & str ) -> IResult < & str , ( ) > {
195
191
let ( input, _) = take_until ( "menuentry" ) ( input) ?;
196
192
Ok ( ( input, ( ) ) )
197
193
}
198
194
199
195
/// Parses all menuentries from a GRUB configuration file.
200
- #[ allow( dead_code) ]
201
196
fn parse_all ( input : & str ) -> IResult < & str , Vec < MenuEntry < ' _ > > > {
202
197
let mut remaining = input;
203
198
let mut entries = Vec :: new ( ) ;
@@ -229,7 +224,6 @@ fn parse_all(input: &str) -> IResult<&str, Vec<MenuEntry<'_>>> {
229
224
}
230
225
231
226
/// Main entry point for parsing GRUB menuentry files.
232
- #[ allow( dead_code) ]
233
227
pub ( crate ) fn parse_grub_menuentry_file ( contents : & str ) -> anyhow:: Result < Vec < MenuEntry < ' _ > > > {
234
228
let ( _, entries) = parse_all ( & contents)
235
229
. map_err ( |e| anyhow:: anyhow!( "Failed to parse GRUB menuentries: {e}" ) ) ?;
0 commit comments