Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dag/extdeps/docker/container_inspect.dag
Original file line number Diff line number Diff line change
Expand Up @@ -953,15 +953,15 @@ fn docker_inspect_nested_network_settings(obj: JsonValue) -> NestedObjectRead<Ne
// ONE FOLD, NOT THREE INSTANTIATIONS OF IT. A first cut carried a byte-identical copy per nested
// type because the field access at ONE call site could not infer `T` -- and the answer to that is
// to name the type at that site, not to mint three declarations of one concept in a shared decoder.
fn nested_value(r: NestedObjectRead<T>) -> T? {
fn nested_value<T>(r: NestedObjectRead<T>) -> T? {
match r {
NestedAbsent => none
NestedMalformed { causes: _ } => none
NestedRead { value: v } => Present { value: v }
}
}

fn nested_causes(r: NestedObjectRead<T>) -> List<String> {
fn nested_causes<T>(r: NestedObjectRead<T>) -> List<String> {
match r {
NestedAbsent => []
NestedMalformed { causes: cs } => cs
Expand Down
4 changes: 2 additions & 2 deletions dag/extdeps/languages/json/parse.dag
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ fn json_field_string_list(obj: JsonValue, key: String) -> JsonFieldRead<List<Str
// matches would report the first and hide the rest, which turns one decode into four round trips
// against a live daemon -- and against a CAPTURE, which cannot be re-run at all, it would hide
// findings permanently.
fn json_field_value(r: JsonFieldRead<T>) -> T? {
fn json_field_value<T>(r: JsonFieldRead<T>) -> T? {
match r {
FieldAbsent => none
FieldMalformed { cause: _ } => none
Expand All @@ -644,7 +644,7 @@ fn json_field_value(r: JsonFieldRead<T>) -> T? {
}


fn json_field_cause(r: JsonFieldRead<T>) -> String? {
fn json_field_cause<T>(r: JsonFieldRead<T>) -> String? {
match r {
FieldAbsent => none
FieldMalformed { cause: c } => Present { value: c }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1313,7 +1313,7 @@ fn sel_channel(channel: NonEmptyStr, s: SelSnapshotReading) -> BmcChannelRead {
} }
}

fn members_channel(channel: NonEmptyStr, m: MembersReading<T>) -> BmcChannelRead {
fn members_channel<T>(channel: NonEmptyStr, m: MembersReading<T>) -> BmcChannelRead {
BmcChannelRead { channel: channel, standing: match m {
MembersRead { members: _ } => BmcChannelAnswered
MembersUnread { cause: c } => BmcChannelFailed { cause: c }
Expand Down
2 changes: 1 addition & 1 deletion dag/gunbc/machine_intake/mtjade1_access_observation.dag
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ fn field_unread(field: NonEmptyStr, cause: String) -> RecordedManagerDecode {
RecordedManagerRefused { gap: CaptureFieldUnread { field: field, cause: cause } }
}

fn read_cause(r: JsonFieldRead<T>) -> String {
fn read_cause<T>(r: JsonFieldRead<T>) -> String {
match r {
FieldAbsent => "absent"
FieldMalformed { cause: c } => c
Expand Down