Initial project import
This commit is contained in:
commit
23f2d29e32
11957 files changed
+1754577
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import toml
|
||||
|
||||
struct Address {
|
||||
street string
|
||||
city string
|
||||
}
|
||||
|
||||
fn test_inline() {
|
||||
a := Address{'Elm Street', 'Springwood'}
|
||||
|
||||
mut mp := map[string]toml.Any{}
|
||||
mp['street'] = toml.Any(a.street)
|
||||
mp['city'] = toml.Any(a.city)
|
||||
|
||||
assert mp.to_inline_toml() == '{ street = "Elm Street", city = "Springwood" }'
|
||||
}
|
||||
Reference in new issue
Block a user