File tree Expand file tree Collapse file tree
StandardLibrary/runtimes/go/ImplementationFromDafny-go Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,8 +104,8 @@ func (_this *MutableMap) Items() _dafny.Set {
104104}
105105func (_this * MutableMap ) Select (k interface {}) interface {} {
106106 r := _this .Get (k )
107- if r .IsFailure () {
108- panic ( "ff" )
107+ if r .Is_None () {
108+ return nil
109109 }
110110 return r .Dtor_value ()
111111}
@@ -141,5 +141,3 @@ func (_this *MutableMap) Size() _dafny.Int {
141141 return c
142142 }
143143}
144-
145- // End of class MutableMap
Original file line number Diff line number Diff line change 11package UUID
22
33import (
4- "fmt"
5-
64 "github.com/dafny-lang/DafnyRuntimeGo/v4/dafny"
75 "github.com/dafny-lang/DafnyStandardLibGo/Wrappers"
86 "github.com/google/uuid"
@@ -24,11 +22,11 @@ func ToByteArray(seq dafny.Sequence) Wrappers.Result {
2422
2523func FromByteArray (seq dafny.Sequence ) Wrappers.Result {
2624 byteArray := dafny .ToByteArray (seq )
27- uuid , err := uuid .FromBytes (byteArray )
25+ fromBytes , err := uuid .FromBytes (byteArray )
2826 if err != nil {
29- return Wrappers .Companion_Result_ .Create_Failure_ (fmt . Errorf ( "Failed To Generate UUID From Byte Array" ) )
27+ return Wrappers .Companion_Result_ .Create_Failure_ (err )
3028 }
31- return Wrappers .Companion_Result_ .Create_Success_ (dafny .SeqOfChars ([]dafny.Char (uuid .String ())... ))
29+ return Wrappers .Companion_Result_ .Create_Success_ (dafny .SeqOfChars ([]dafny.Char (fromBytes .String ())... ))
3230}
3331
3432func GenerateUUID () Wrappers.Result {
You can’t perform that action at this time.
0 commit comments