Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita3f9ba3

Browse files
committed
Switch annotations to be a slice
1 parent52b874c commita3f9ba3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

‎benches/simple.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ fn create_snippet() {
4646
source:SOURCE,
4747
line_start:Some(51),
4848
origin:Some("src/format.rs"),
49-
annotations:vec![
49+
annotations:&[
5050
SourceAnnotation{
5151
label:"expected `Option<String>` because of return type",
5252
annotation_type:AnnotationType::Warning,

‎examples/format.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fn main() {
4040
source,
4141
line_start:Some(51),
4242
origin:Some("src/format.rs"),
43-
annotations:vec![
43+
annotations:&[
4444
SourceAnnotation{
4545
label:"expected `Option<String>` because of return type",
4646
annotation_type:AnnotationType::Warning,

‎src/slice.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ pub struct Slice<'s> {
55
pubsource:&'sstr,
66
publine_start:Option<usize>,
77
puborigin:Option<&'sstr>,
8-
pubannotations:Vec<SourceAnnotation<'s>>,
8+
pubannotations:&'s[SourceAnnotation<'s>],
99
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp