File tree Expand file tree Collapse file tree 5 files changed +10
-9
lines changed
Expand file tree Collapse file tree 5 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -1317,9 +1317,9 @@ const UNASSOCIATED_DISPLAY_THRESHOLD: usize = 3;
13171317/// The returned message has the format "Missing association of x".
13181318/// * If there is only one element, the message becomes "Missing association of element the_element"
13191319/// * If there are more elements, the message becomes
1320- /// "Missing association of element the_element1, the_element2 and the_element3"
1320+ /// "Missing association of element the_element1, the_element2 and the_element3"
13211321/// * If there are more elements than [UNASSOCIATED_DISPLAY_THRESHOLD], the message will be truncated
1322- /// to "Missing association of element the_element1, the_element2, the_element3 and 17 more"
1322+ /// to "Missing association of element the_element1, the_element2, the_element3 and 17 more"
13231323fn pretty_format_unassociated_message ( unassociated : & HashSet < & RecordElement < ' _ > > ) -> String {
13241324 assert ! (
13251325 !unassociated. is_empty( ) ,
Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ pub(crate) fn bit_string_to_string(
219219 Err ( EmptySignedExpansion )
220220 } else {
221221 Ok ( Latin1String :: from_vec (
222- iter:: repeat ( b'0' ) . take ( value as usize ) . collect_vec ( ) ,
222+ iter:: repeat_n ( b'0' , value as usize ) . collect_vec ( ) ,
223223 ) )
224224 }
225225 }
@@ -279,8 +279,7 @@ pub(crate) fn bit_string_to_string(
279279 } else {
280280 b'0'
281281 } ;
282- let pad_vector = iter:: repeat ( pad_char)
283- . take ( length - extended_value. len ( ) )
282+ let pad_vector = iter:: repeat_n ( pad_char, length - extended_value. len ( ) )
284283 . chain ( extended_value)
285284 . collect_vec ( ) ;
286285 Ok ( Latin1String :: from_vec ( pad_vector) )
Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ impl<'a> AnalyzeContext<'a, '_> {
233233 ///
234234 /// * `scope` - The scope that this instance was declared in
235235 /// * `inst_subprogram_ent` - A reference to the instantiated subprogram entity.
236- /// Used to set the parent reference of the signature
236+ /// Used to set the parent reference of the signature
237237 /// * `uninst_name` - The [ResolvedName] of the uninstantiated subprogram
238238 /// * `instance` - A reference to the AST element of the subprogram instantiation
239239 /// * `diagnostics` - The diagnostics handler
Original file line number Diff line number Diff line change @@ -102,8 +102,10 @@ impl Buffer {
102102 }
103103
104104 fn indent ( & mut self ) {
105- self . inner
106- . extend ( iter:: repeat ( self . indent_char ) . take ( self . indent_width * self . indentation ) ) ;
105+ self . inner . extend ( iter:: repeat_n (
106+ self . indent_char ,
107+ self . indent_width * self . indentation ,
108+ ) ) ;
107109 }
108110
109111 /// Push a token to this buffer.
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ use crate::TokenId;
1313/// When the next token is
1414/// * a semicolon, then consume that token and produce no error
1515/// * a token that could be confused with a semicolon (i.e., a comma),
16- /// then consume that token and report an error
16+ /// then consume that token and report an error
1717/// * none of these choices: do not consume the token and report an error
1818pub fn expect_semicolon ( ctx : & mut ParsingContext < ' _ > ) -> Option < TokenId > {
1919 let token = match ctx. stream . peek_expect ( ) {
You can’t perform that action at this time.
0 commit comments