update some deps, including cursive

cursive renamed a few methods, so keep up with that. No functional
changes.
This commit is contained in:
Scott Lamb 2020-01-20 08:56:57 -08:00
parent 038fc574e9
commit dd3c3f2f84
5 changed files with 275 additions and 239 deletions

404
Cargo.lock generated
View File

@ -6,6 +6,15 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2"
[[package]]
name = "ahash"
version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f33b5018f120946c1dcf279194f238a9f146725593ead1c08fa47ff22b0b5d3"
dependencies = [
"const-random",
]
[[package]]
name = "aho-corasick"
version = "0.7.6"
@ -54,9 +63,9 @@ dependencies = [
[[package]]
name = "array-macro"
version = "1.0.3"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c4ff37a25fb442a1fecfd399be0dde685558bca30fb998420532889a36852d2"
checksum = "7d034edd76d4e7adc314c95400941dedc89bd4337d565bf87f6b69d3b20dc4de"
[[package]]
name = "arrayref"
@ -81,10 +90,11 @@ checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8"
[[package]]
name = "atty"
version = "0.2.13"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90"
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
dependencies = [
"hermit-abi",
"libc",
"winapi 0.3.8",
]
@ -96,10 +106,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2"
[[package]]
name = "backtrace"
version = "0.3.40"
name = "autocfg"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "924c76597f0d9ca25d762c25a4d369d51267536465dc5064bdf0eb073ed477ea"
checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
[[package]]
name = "backtrace"
version = "0.3.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4b1549d804b6c73f4817df2ba073709e96e426f12987127c48e6745568c350b"
dependencies = [
"backtrace-sys",
"cfg-if",
@ -127,15 +143,6 @@ dependencies = [
"safemem",
]
[[package]]
name = "base64"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e"
dependencies = [
"byteorder",
]
[[package]]
name = "base64"
version = "0.11.0"
@ -160,9 +167,9 @@ dependencies = [
[[package]]
name = "blake2b_simd"
version = "0.5.9"
version = "0.5.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b83b7baab1e671718d78204225800d6b170e648188ac7dc992e9d6bddf87d0c0"
checksum = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a"
dependencies = [
"arrayref",
"arrayvec 0.5.1",
@ -192,9 +199,9 @@ dependencies = [
[[package]]
name = "bstr"
version = "0.2.8"
version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d6c2c5b58ab920a4f5aeaaca34b4488074e8cc7596af94e6f8c6ff247c60245"
checksum = "3ede750122d9d1f87919570cb2cccee38c84fbc8c5599b25c289af40625b7030"
dependencies = [
"lazy_static",
"memchr",
@ -237,9 +244,9 @@ dependencies = [
[[package]]
name = "cc"
version = "1.0.48"
version = "1.0.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f52a465a666ca3d838ebbf08b241383421412fe7ebb463527bba275526d89f76"
checksum = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd"
[[package]]
name = "cfg-if"
@ -283,10 +290,30 @@ dependencies = [
]
[[package]]
name = "constant_time_eq"
version = "0.1.4"
name = "const-random"
version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "995a44c877f9212528ccc74b21a232f66ad69001e40ede5bcee2ac9ef2657120"
checksum = "2f1af9ac737b2dd2d577701e59fd09ba34822f6f2ebdb30a7647405d9e55e16a"
dependencies = [
"const-random-macro",
"proc-macro-hack",
]
[[package]]
name = "const-random-macro"
version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25e4c606eb459dd29f7c57b2e0879f2b6f14ee130918c2b78ccb58a9624e6c7a"
dependencies = [
"getrandom",
"proc-macro-hack",
]
[[package]]
name = "constant_time_eq"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
[[package]]
name = "core-foundation"
@ -315,11 +342,11 @@ dependencies = [
[[package]]
name = "crossbeam-channel"
version = "0.3.9"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c8ec7fcd21571dc78f96cc96243cab8d8f035247c3efd16c687be154c3fa9efa"
checksum = "acec9a3b0b3559f15aee4f90746c4e5e293b701c0f7d3925d24e01645267b68c"
dependencies = [
"crossbeam-utils",
"crossbeam-utils 0.7.0",
]
[[package]]
@ -332,6 +359,17 @@ dependencies = [
"lazy_static",
]
[[package]]
name = "crossbeam-utils"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4"
dependencies = [
"autocfg 0.1.7",
"cfg-if",
"lazy_static",
]
[[package]]
name = "crypto-mac"
version = "0.7.0"
@ -359,14 +397,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd670e5ff58768ef624207fb95709ce63b8d05573fb9a05165f0eef471ea6a3a"
dependencies = [
"procedural-masquerade",
"syn 1.0.11",
"syn 1.0.14",
]
[[package]]
name = "csv"
version = "1.1.1"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37519ccdfd73a75821cac9319d4fce15a81b9fcf75f951df5b9988aa3a0af87d"
checksum = "00affe7f6ab566df61b4be3ce8cf16bc2576bca0963ceb0955e45d514bf9a279"
dependencies = [
"bstr",
"csv-core",
@ -386,16 +424,16 @@ dependencies = [
[[package]]
name = "cursive"
version = "0.12.0"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7ecc7282b5361471b607c26f44148205607e26d48a2fc65bd16e7619b1ebb78"
checksum = "341b03eec276c30c6cdc640d8bd8c08eac9605064c3f9c4838f958dac06973bb"
dependencies = [
"ahash",
"cfg-if",
"chrono",
"crossbeam-channel",
"enum-map",
"enumset",
"hashbrown",
"lazy_static",
"libc",
"log",
@ -405,7 +443,6 @@ dependencies = [
"owning_ref",
"signal-hook",
"term_size",
"toml 0.5.5",
"unicode-segmentation",
"unicode-width",
"xi-unicode",
@ -429,10 +466,10 @@ checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b"
dependencies = [
"fnv",
"ident_case",
"proc-macro2 1.0.6",
"proc-macro2 1.0.8",
"quote 1.0.2",
"strsim 0.9.3",
"syn 1.0.11",
"syn 1.0.14",
]
[[package]]
@ -443,7 +480,7 @@ checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72"
dependencies = [
"darling_core",
"quote 1.0.2",
"syn 1.0.11",
"syn 1.0.14",
]
[[package]]
@ -513,12 +550,12 @@ dependencies = [
[[package]]
name = "enum-map"
version = "0.5.0"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ccd9b2d5e0eb5c2ff851791e2af90ab4531b1168cfc239d1c0bf467e60ba3c89"
checksum = "70a375f899a53b9848ad9fb459b5bf90e4851ae5d9fea89134b062dc1828b26e"
dependencies = [
"array-macro",
"enum-map-derive",
"enum-map-internals",
]
[[package]]
@ -527,18 +564,9 @@ version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e57001dfb2532f5a103ff869656887fae9a8defa7d236f3e39d2ee86ed629ad7"
dependencies = [
"proc-macro2 1.0.6",
"proc-macro2 1.0.8",
"quote 1.0.2",
"syn 1.0.11",
]
[[package]]
name = "enum-map-internals"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2436d68e28d1ec1646f3e54003c6b4c4e192785532a687d52a3d2ba56c346bb"
dependencies = [
"array-macro",
"syn 1.0.14",
]
[[package]]
@ -558,9 +586,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b184c2d0714bbeeb6440481a19c78530aa210654d99529f13d2f860a1b447598"
dependencies = [
"darling",
"proc-macro2 1.0.6",
"proc-macro2 1.0.8",
"quote 1.0.2",
"syn 1.0.11",
"syn 1.0.14",
]
[[package]]
@ -598,9 +626,9 @@ version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08"
dependencies = [
"proc-macro2 1.0.6",
"proc-macro2 1.0.8",
"quote 1.0.2",
"syn 1.0.11",
"syn 1.0.14",
"synstructure",
]
@ -732,9 +760,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52e7c56c15537adb4f76d0b7a76ad131cb4d2f4f32d3b0bcabcbe1c7c5e87764"
dependencies = [
"proc-macro-hack",
"proc-macro2 1.0.6",
"proc-macro2 1.0.8",
"quote 1.0.2",
"syn 1.0.11",
"syn 1.0.14",
]
[[package]]
@ -785,9 +813,9 @@ dependencies = [
[[package]]
name = "getrandom"
version = "0.1.13"
version = "0.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7db7ca94ed4cd01190ceee0d8a8052f08a247aa1b469a7f68c6a3b71afcf407"
checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb"
dependencies = [
"cfg-if",
"libc",
@ -813,12 +841,6 @@ dependencies = [
"tokio-util",
]
[[package]]
name = "hashbrown"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29fba9abe4742d586dfd0c06ae4f7e73a1c2d86b856933509b269d82cdf06e18"
[[package]]
name = "heck"
version = "0.3.1"
@ -830,9 +852,9 @@ dependencies = [
[[package]]
name = "hermit-abi"
version = "0.1.5"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f629dc602392d3ec14bfc8a09b5e644d7ffd725102b48b81e59f90f2633621d7"
checksum = "eff2656d88f158ce120947499e971d743c05dbcbed62e5bd2f38f1698bbc3772"
dependencies = [
"libc",
]
@ -870,9 +892,9 @@ dependencies = [
[[package]]
name = "http-serve"
version = "0.2.0"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03782df25e951e511f22e5ba6189f63a297b5e69c9814d45d3e6ac8f2811916a"
checksum = "f9e9efe3a2525d9bde418d52082845d4641c9acc426c3268b38dc14c0f5d77e3"
dependencies = [
"bytes",
"flate2",
@ -882,7 +904,7 @@ dependencies = [
"httpdate",
"mime",
"smallvec 1.1.0",
"time 0.2.1",
"time 0.2.4",
"tokio",
"winapi 0.3.8",
]
@ -955,11 +977,11 @@ dependencies = [
[[package]]
name = "indexmap"
version = "1.3.0"
version = "1.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712d7b3ea5827fcb9d4fda14bf4da5f136f0db2ae9c8f4bd4e2d1c6fde4e6db2"
checksum = "0b54058f0a6ff80b6803da8faf8997cde53872b38f4023728f6830b06cd3c0dc"
dependencies = [
"autocfg",
"autocfg 1.0.0",
]
[[package]]
@ -1057,9 +1079,9 @@ checksum = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83"
[[package]]
name = "lock_api"
version = "0.3.2"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e57b3997725d2b60dbec1297f6c2e2957cc383db1cebd6be812163f969c7d586"
checksum = "79b2de95ecb4691949fea4716ca53cdbcfccb2c612e19644a8bad05edcf9f47b"
dependencies = [
"scopeguard",
]
@ -1102,9 +1124,9 @@ checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00"
[[package]]
name = "memchr"
version = "2.2.1"
version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e"
checksum = "3197e20c7edb283f87c071ddfc7a2cca8f8e0b888c242959846a6fce03c72223"
dependencies = [
"libc",
]
@ -1121,9 +1143,9 @@ dependencies = [
[[package]]
name = "mime"
version = "0.3.14"
version = "0.3.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd1d63acd1b78403cc0c325605908475dd9b9a3acbf65ed8bcab97e27014afcf"
checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d"
[[package]]
name = "mime_guess"
@ -1367,9 +1389,9 @@ dependencies = [
[[package]]
name = "num"
version = "0.2.0"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf4825417e1e1406b3782a8ce92f4d53f26ec055e3622e1881ca8e9f5f9e08db"
checksum = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36"
dependencies = [
"num-complex",
"num-integer",
@ -1380,60 +1402,60 @@ dependencies = [
[[package]]
name = "num-complex"
version = "0.2.3"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcb0cf31fb3ff77e6d2a6ebd6800df7fdcd106f2ad89113c9130bcd07f93dffc"
checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95"
dependencies = [
"autocfg",
"autocfg 1.0.0",
"num-traits",
]
[[package]]
name = "num-integer"
version = "0.1.41"
version = "0.1.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b85e541ef8255f6cf42bbfe4ef361305c6c135d10919ecc26126c4e5ae94bc09"
checksum = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba"
dependencies = [
"autocfg",
"autocfg 1.0.0",
"num-traits",
]
[[package]]
name = "num-iter"
version = "0.1.39"
version = "0.1.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76bd5272412d173d6bf9afdf98db8612bbabc9a7a830b7bfc9c188911716132e"
checksum = "dfb0800a0291891dd9f4fe7bd9c19384f98f7fbe0cd0f39a2c6b88b9868bbc00"
dependencies = [
"autocfg",
"autocfg 1.0.0",
"num-integer",
"num-traits",
]
[[package]]
name = "num-rational"
version = "0.2.2"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2885278d5fe2adc2f75ced642d52d879bffaceb5a2e0b1d4309ffdfb239b454"
checksum = "da4dc79f9e6c81bef96148c8f6b8e72ad4541caa4a24373e900a36da07de03a3"
dependencies = [
"autocfg",
"autocfg 1.0.0",
"num-integer",
"num-traits",
]
[[package]]
name = "num-traits"
version = "0.2.10"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4c81ffc11c212fa327657cb19dd85eb7419e163b5b076bede2bdb5c974c07e4"
checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096"
dependencies = [
"autocfg",
"autocfg 1.0.0",
]
[[package]]
name = "num_cpus"
version = "1.11.1"
version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76dac5ed2a876980778b8b85f75a71b6cbf0db0b1232ee12f826bccb00d09d72"
checksum = "46203554f085ff89c235cd12f7075f3233af9b11ed7c9e16dfe2560d03313ce6"
dependencies = [
"hermit-abi",
"libc",
@ -1482,7 +1504,7 @@ version = "0.9.53"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "465d16ae7fc0e313318f7de5cecf57b2fbe7511fd213978b457e1c96ff46736f"
dependencies = [
"autocfg",
"autocfg 0.1.7",
"cc",
"libc",
"pkg-config",
@ -1542,29 +1564,29 @@ checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
[[package]]
name = "pin-project"
version = "0.4.6"
version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94b90146c7216e4cb534069fb91366de4ea0ea353105ee45ed297e2d1619e469"
checksum = "75fca1c4ff21f60ca2d37b80d72b63dab823a9d19d3cda3a81d18bc03f0ba8c5"
dependencies = [
"pin-project-internal",
]
[[package]]
name = "pin-project-internal"
version = "0.4.6"
version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44ca92f893f0656d3cba8158dd0f2b99b94de256a4a54e870bd6922fcc6c8355"
checksum = "6544cd4e4ecace61075a6ec78074beeef98d58aa9a3d07d053d993b2946a90d6"
dependencies = [
"proc-macro2 1.0.6",
"proc-macro2 1.0.8",
"quote 1.0.2",
"syn 1.0.11",
"syn 1.0.14",
]
[[package]]
name = "pin-project-lite"
version = "0.1.1"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0af6cbca0e6e3ce8692ee19fb8d734b641899e07b68eb73e9bbbd32f1703991"
checksum = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae"
[[package]]
name = "pin-utils"
@ -1615,9 +1637,9 @@ version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5"
dependencies = [
"proc-macro2 1.0.6",
"proc-macro2 1.0.8",
"quote 1.0.2",
"syn 1.0.11",
"syn 1.0.14",
]
[[package]]
@ -1637,9 +1659,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
version = "1.0.6"
version = "1.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c9e470a8dc4aeae2dee2f335e8f533e2d4b347e1434e5671afc49b054592f27"
checksum = "3acb317c6ff86a4e579dfa00fc5e6cca91ecbb4e7eb2df0468805b674eb88548"
dependencies = [
"unicode-xid 0.2.0",
]
@ -1653,12 +1675,12 @@ checksum = "9a1574a51c3fd37b26d2c0032b649d08a7d51d4cca9c41bbc5bf7118fa4509d0"
[[package]]
name = "protobuf"
version = "3.0.0-pre"
source = "git+https://github.com/stepancheg/rust-protobuf#53dc4ae8b2d20b3e6cb971c68042968a45d23882"
source = "git+https://github.com/stepancheg/rust-protobuf#9d81264745951cb9491179be4f9a50a8bc1ce951"
[[package]]
name = "protobuf-codegen"
version = "3.0.0-pre"
source = "git+https://github.com/stepancheg/rust-protobuf#53dc4ae8b2d20b3e6cb971c68042968a45d23882"
source = "git+https://github.com/stepancheg/rust-protobuf#9d81264745951cb9491179be4f9a50a8bc1ce951"
dependencies = [
"protobuf",
]
@ -1666,7 +1688,7 @@ dependencies = [
[[package]]
name = "protobuf-codegen-pure"
version = "3.0.0-pre"
source = "git+https://github.com/stepancheg/rust-protobuf#53dc4ae8b2d20b3e6cb971c68042968a45d23882"
source = "git+https://github.com/stepancheg/rust-protobuf#9d81264745951cb9491179be4f9a50a8bc1ce951"
dependencies = [
"protobuf",
"protobuf-codegen",
@ -1687,7 +1709,7 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe"
dependencies = [
"proc-macro2 1.0.6",
"proc-macro2 1.0.8",
]
[[package]]
@ -1728,9 +1750,9 @@ dependencies = [
[[package]]
name = "rand"
version = "0.7.2"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ae1b169243eaf61759b8475a998f0a385e42042370f3a7dbaf35246eacc8412"
checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
dependencies = [
"getrandom",
"libc",
@ -1782,20 +1804,6 @@ dependencies = [
"rand_core 0.5.1",
]
[[package]]
name = "rand_os"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071"
dependencies = [
"cloudabi",
"fuchsia-cprng",
"libc",
"rand_core 0.4.2",
"rdrand",
"winapi 0.3.8",
]
[[package]]
name = "rawpointer"
version = "0.1.0"
@ -1828,12 +1836,11 @@ checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84"
[[package]]
name = "redox_users"
version = "0.3.1"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ecedbca3bf205f8d8f5c2b44d83cd0690e39ee84b951ed649e9f1841132b66d"
checksum = "1dc1887cbcd764cc066e2c08681a5615433ac3de9752838a9ec114613b118575"
dependencies = [
"failure",
"rand_os",
"getrandom",
"redox_syscall",
"rust-argon2",
]
@ -1849,9 +1856,9 @@ dependencies = [
[[package]]
name = "regex"
version = "1.3.1"
version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc220bd33bdce8f093101afe22a037b8eb0e5af33592e6a9caafff0d4cb81cbd"
checksum = "b5508c1941e4e7cb19965abef075d35a9a8b5cdf0846f30b4050e9b55dc55e87"
dependencies = [
"aho-corasick",
"memchr",
@ -1870,9 +1877,9 @@ dependencies = [
[[package]]
name = "regex-syntax"
version = "0.6.12"
version = "0.6.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716"
checksum = "e734e891f5b408a29efbf8309e656876276f49ab6a6ac208600b4419bd893d90"
[[package]]
name = "remove_dir_all"
@ -1961,13 +1968,14 @@ dependencies = [
[[package]]
name = "rust-argon2"
version = "0.5.1"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ca4eaef519b494d1f2848fc602d18816fed808a981aedf4f1f00ceb7c9d32cf"
checksum = "416f5109bdd413cec4f04c029297838e7604c993f8d1483b1d438f23bdc3eb35"
dependencies = [
"base64 0.10.1",
"base64 0.11.0",
"blake2b_simd",
"crossbeam-utils",
"constant_time_eq",
"crossbeam-utils 0.6.6",
]
[[package]]
@ -2004,6 +2012,17 @@ dependencies = [
"semver",
]
[[package]]
name = "rustversion"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a0538bd897e17257b0128d2fd95c2ed6df939374073a36166051a79e2eb7986"
dependencies = [
"proc-macro2 1.0.8",
"quote 1.0.2",
"syn 1.0.14",
]
[[package]]
name = "ryu"
version = "1.0.2"
@ -2114,9 +2133,9 @@ version = "1.0.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64"
dependencies = [
"proc-macro2 1.0.6",
"proc-macro2 1.0.8",
"quote 1.0.2",
"syn 1.0.11",
"syn 1.0.14",
]
[[package]]
@ -2144,7 +2163,7 @@ dependencies = [
"serde_bytes",
"serde_derive",
"serde_json",
"toml 0.4.10",
"toml",
]
[[package]]
@ -2173,9 +2192,9 @@ dependencies = [
[[package]]
name = "sha2"
version = "0.8.0"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d"
checksum = "27044adfd2e1f077f649f59deb9490d3941d674002f7d062870a60ebe9bd47a0"
dependencies = [
"block-buffer",
"digest",
@ -2295,11 +2314,11 @@ dependencies = [
[[package]]
name = "syn"
version = "1.0.11"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dff0acdb207ae2fe6d5976617f887eb1e35a2ba52c13c7234c790960cdad9238"
checksum = "af6f3550d8dff9ef7dc34d384ac6f107e5d31c8f57d9f28e0081503f547ac8f5"
dependencies = [
"proc-macro2 1.0.6",
"proc-macro2 1.0.8",
"quote 1.0.2",
"unicode-xid 0.2.0",
]
@ -2310,9 +2329,9 @@ version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545"
dependencies = [
"proc-macro2 1.0.6",
"proc-macro2 1.0.8",
"quote 1.0.2",
"syn 1.0.11",
"syn 1.0.14",
"unicode-xid 0.2.0",
]
@ -2334,7 +2353,7 @@ checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9"
dependencies = [
"cfg-if",
"libc",
"rand 0.7.2",
"rand 0.7.3",
"redox_syscall",
"remove_dir_all",
"winapi 0.3.8",
@ -2373,9 +2392,9 @@ dependencies = [
[[package]]
name = "thread_local"
version = "0.3.6"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b"
checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14"
dependencies = [
"lazy_static",
]
@ -2393,15 +2412,41 @@ dependencies = [
[[package]]
name = "time"
version = "0.2.1"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac6de5d6171ae395cd957a9cfdcf9a41e39fe23e558b29043104a896a79021b6"
checksum = "d6892c6ec856165a7f6caf63366f9c85a6898ceddffd740e8ecbbcf596d4c2e7"
dependencies = [
"rustversion",
"time-macros",
]
[[package]]
name = "time-macros"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ae9b6e9f095bc105e183e3cd493d72579be3181ad4004fceb01adbe9eecab2d"
dependencies = [
"proc-macro-hack",
"time-macros-impl",
]
[[package]]
name = "time-macros-impl"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e987cfe0537f575b5fc99909de6185f6c19c3ad8889e2275e686a873d0869ba1"
dependencies = [
"proc-macro-hack",
"proc-macro2 1.0.8",
"quote 1.0.2",
"syn 1.0.14",
]
[[package]]
name = "tokio"
version = "0.2.6"
version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e1bef565a52394086ecac0a6fa3b8ace4cb3a138ee1d96bd2b93283b56824e3"
checksum = "ffa2fdcfa937b20cb3c822a635ceecd5fc1a27a6a474527e5516aa24b8c8820a"
dependencies = [
"bytes",
"fnv",
@ -2421,12 +2466,12 @@ dependencies = [
[[package]]
name = "tokio-macros"
version = "0.2.1"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7de6c21a09bab0ce34614bb1071403ad9996db62715eb61e63be5d82f91342bc"
checksum = "50a61f268a3db2acee8dcab514efc813dc6dbe8a00e86076f935f94304b59a7a"
dependencies = [
"quote 1.0.2",
"syn 1.0.11",
"syn 1.0.14",
]
[[package]]
@ -2462,15 +2507,6 @@ dependencies = [
"serde",
]
[[package]]
name = "toml"
version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "01d1404644c8b12b16bfcffa4322403a91a451584daaaa7c28d3152e6cbc98cf"
dependencies = [
"serde",
]
[[package]]
name = "tower-service"
version = "0.3.0"
@ -2569,7 +2605,7 @@ version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9fde2f6a4bea1d6e007c4ad38c6839fa71cbb63b6dbf5b595aa38dc9b1093c11"
dependencies = [
"rand 0.7.2",
"rand 0.7.3",
"serde",
]
@ -2615,9 +2651,9 @@ dependencies = [
[[package]]
name = "wasi"
version = "0.7.0"
version = "0.9.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d"
checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
[[package]]
name = "wasm-bindgen"
@ -2640,9 +2676,9 @@ dependencies = [
"bumpalo",
"lazy_static",
"log",
"proc-macro2 1.0.6",
"proc-macro2 1.0.8",
"quote 1.0.2",
"syn 1.0.11",
"syn 1.0.14",
"wasm-bindgen-shared",
]
@ -2674,9 +2710,9 @@ version = "0.2.58"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e85031354f25eaebe78bb7db1c3d86140312a911a106b2e29f9cc440ce3e7668"
dependencies = [
"proc-macro2 1.0.6",
"proc-macro2 1.0.8",
"quote 1.0.2",
"syn 1.0.11",
"syn 1.0.14",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@ -2696,9 +2732,9 @@ dependencies = [
"anyhow",
"heck",
"log",
"proc-macro2 1.0.6",
"proc-macro2 1.0.8",
"quote 1.0.2",
"syn 1.0.11",
"syn 1.0.14",
"wasm-bindgen-backend",
"weedle",
]
@ -2780,9 +2816,9 @@ dependencies = [
[[package]]
name = "xi-unicode"
version = "0.1.0"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12ea8eda4b1eb72f02d148402e23832d56a33f55d8c1b2d5bcdde91d79d47cb1"
checksum = "7395cdb9d0a6219fa0ea77d08c946adf9c1984c72fcd443ace30365f3daadef7"
[[package]]
name = "yaml-rust"

View File

@ -23,7 +23,7 @@ base64 = "0.11.0"
bytes = "0.5.3"
byteorder = "1.0"
cstr = "0.1.7"
cursive = "0.12"
cursive = "0.14.0"
db = { package = "moonfire-db", path = "db" }
docopt = "1.0"
failure = "0.1.1"

View File

@ -42,13 +42,13 @@ use url::Url;
/// Builds a `CameraChange` from an active `edit_camera_dialog`.
fn get_change(siv: &mut Cursive) -> db::CameraChange {
// Note: these find_id calls are separate statements, which seems to be important:
// Note: these find_name calls are separate statements, which seems to be important:
// https://github.com/gyscos/Cursive/issues/144
let sn = siv.find_id::<views::EditView>("short_name").unwrap().get_content().as_str().into();
let d = siv.find_id::<views::TextArea>("description").unwrap().get_content().into();
let h = siv.find_id::<views::EditView>("onvif_host").unwrap().get_content().as_str().into();
let u = siv.find_id::<views::EditView>("username").unwrap().get_content().as_str().into();
let p = siv.find_id::<views::EditView>("password").unwrap().get_content().as_str().into();
let sn = siv.find_name::<views::EditView>("short_name").unwrap().get_content().as_str().into();
let d = siv.find_name::<views::TextArea>("description").unwrap().get_content().into();
let h = siv.find_name::<views::EditView>("onvif_host").unwrap().get_content().as_str().into();
let u = siv.find_name::<views::EditView>("username").unwrap().get_content().as_str().into();
let p = siv.find_name::<views::EditView>("password").unwrap().get_content().as_str().into();
let mut c = db::CameraChange {
short_name: sn,
description: d,
@ -58,14 +58,14 @@ fn get_change(siv: &mut Cursive) -> db::CameraChange {
streams: Default::default(),
};
for &t in &db::ALL_STREAM_TYPES {
let u = siv.find_id::<views::EditView>(&format!("{}_rtsp_url", t.as_str()))
let u = siv.find_name::<views::EditView>(&format!("{}_rtsp_url", t.as_str()))
.unwrap().get_content().as_str().into();
let r = siv.find_id::<views::Checkbox>(&format!("{}_record", t.as_str()))
let r = siv.find_name::<views::Checkbox>(&format!("{}_record", t.as_str()))
.unwrap().is_checked();
let f = i64::from_str(siv.find_id::<views::EditView>(
let f = i64::from_str(siv.find_name::<views::EditView>(
&format!("{}_flush_if_sec", t.as_str())).unwrap().get_content().as_str())
.unwrap_or(0);
let d = *siv.find_id::<views::SelectView<Option<i32>>>(
let d = *siv.find_name::<views::SelectView<Option<i32>>>(
&format!("{}_sample_file_dir", t.as_str()))
.unwrap().selection().unwrap();
c.streams[t.index()] = db::StreamChange {
@ -173,7 +173,7 @@ fn press_delete(siv: &mut Cursive, db: &Arc<db::Database>, id: i32, name: String
.child(views::EditView::new().on_submit({
let db = db.clone();
move |siv, _| confirm_deletion(siv, &db, id, to_delete)
}).with_id("confirm")))
}).with_name("confirm")))
.button("Delete", {
let db = db.clone();
move |siv| confirm_deletion(siv, &db, id, to_delete)
@ -189,7 +189,7 @@ fn press_delete(siv: &mut Cursive, db: &Arc<db::Database>, id: i32, name: String
}
fn confirm_deletion(siv: &mut Cursive, db: &Arc<db::Database>, id: i32, to_delete: i64) {
let typed = siv.find_id::<views::EditView>("confirm").unwrap().get_content();
let typed = siv.find_name::<views::EditView>("confirm").unwrap().get_content();
if decode_size(typed.as_str()).ok() == Some(to_delete) {
siv.pop_layer(); // deletion confirmation dialog
@ -259,16 +259,16 @@ fn edit_camera_dialog(db: &Arc<db::Database>, siv: &mut Cursive, item: &Option<i
None => "<new>".to_string(),
Some(id) => id.to_string(),
}))
.child("uuid", views::TextView::new("<new>").with_id("uuid"))
.child("short name", views::EditView::new().with_id("short_name"))
.child("onvif_host", views::EditView::new().with_id("onvif_host"))
.child("username", views::EditView::new().with_id("username"))
.child("password", views::EditView::new().with_id("password"))
.child("uuid", views::TextView::new("<new>").with_name("uuid"))
.child("short name", views::EditView::new().with_name("short_name"))
.child("onvif_host", views::EditView::new().with_name("onvif_host"))
.child("username", views::EditView::new().with_name("username"))
.child("password", views::EditView::new().with_name("password"))
.min_height(6);
let mut layout = views::LinearLayout::vertical()
.child(camera_list)
.child(views::TextView::new("description"))
.child(views::TextArea::new().with_id("description").min_height(3));
.child(views::TextArea::new().with_name("description").min_height(3));
let dirs: Vec<_> = ::std::iter::once(("<none>".to_owned(), None))
.chain(db.lock()
@ -280,7 +280,7 @@ fn edit_camera_dialog(db: &Arc<db::Database>, siv: &mut Cursive, item: &Option<i
let list = views::ListView::new()
.child("rtsp url", views::LinearLayout::horizontal()
.child(views::EditView::new()
.with_id(format!("{}_rtsp_url", type_.as_str()))
.with_name(format!("{}_rtsp_url", type_.as_str()))
.full_width())
.child(views::DummyView)
.child(views::Button::new("Test", move |siv| press_test(siv, type_))))
@ -288,12 +288,12 @@ fn edit_camera_dialog(db: &Arc<db::Database>, siv: &mut Cursive, item: &Option<i
views::SelectView::<Option<i32>>::new()
.with_all(dirs.iter().map(|d| d.clone()))
.popup()
.with_id(format!("{}_sample_file_dir", type_.as_str())))
.child("record", views::Checkbox::new().with_id(format!("{}_record", type_.as_str())))
.with_name(format!("{}_sample_file_dir", type_.as_str())))
.child("record", views::Checkbox::new().with_name(format!("{}_record", type_.as_str())))
.child("flush_if_sec", views::EditView::new()
.with_id(format!("{}_flush_if_sec", type_.as_str())))
.with_name(format!("{}_flush_if_sec", type_.as_str())))
.child("usage/capacity",
views::TextView::new("").with_id(format!("{}_usage_cap", type_.as_str())))
views::TextView::new("").with_name(format!("{}_usage_cap", type_.as_str())))
.min_height(5);
layout.add_child(views::DummyView);
layout.add_child(views::TextView::new(format!("{} stream", type_.as_str())));
@ -304,7 +304,7 @@ fn edit_camera_dialog(db: &Arc<db::Database>, siv: &mut Cursive, item: &Option<i
let dialog = if let Some(camera_id) = *item {
let l = db.lock();
let camera = l.cameras_by_id().get(&camera_id).expect("missing camera");
dialog.call_on_id("uuid", |v: &mut views::TextView| v.set_content(camera.uuid.to_string()))
dialog.call_on_name("uuid", |v: &mut views::TextView| v.set_content(camera.uuid.to_string()))
.expect("missing TextView");
let mut bytes = 0;
@ -329,17 +329,17 @@ fn edit_camera_dialog(db: &Arc<db::Database>, siv: &mut Cursive, item: &Option<i
format!("{} / {} ({:.1}%)", s.sample_file_bytes, s.retain_bytes,
100. * s.sample_file_bytes as f32 / s.retain_bytes as f32)
};
dialog.call_on_id(&format!("{}_rtsp_url", t.as_str()),
dialog.call_on_name(&format!("{}_rtsp_url", t.as_str()),
|v: &mut views::EditView| v.set_content(s.rtsp_url.to_owned()));
dialog.call_on_id(&format!("{}_usage_cap", t.as_str()),
dialog.call_on_name(&format!("{}_usage_cap", t.as_str()),
|v: &mut views::TextView| v.set_content(u));
dialog.call_on_id(&format!("{}_record", t.as_str()),
dialog.call_on_name(&format!("{}_record", t.as_str()),
|v: &mut views::Checkbox| v.set_checked(s.record));
dialog.call_on_id(
dialog.call_on_name(
&format!("{}_flush_if_sec", t.as_str()),
|v: &mut views::EditView| v.set_content(s.flush_if_sec.to_string()));
}
dialog.call_on_id(
dialog.call_on_name(
&format!("{}_sample_file_dir", t.as_str()),
|v: &mut views::SelectView<Option<i32>>| v.set_selection(selected_dir));
}
@ -348,10 +348,10 @@ fn edit_camera_dialog(db: &Arc<db::Database>, siv: &mut Cursive, item: &Option<i
("onvif_host", &*camera.onvif_host),
("username", &*camera.username),
("password", &*camera.password)] {
dialog.call_on_id(view_id, |v: &mut views::EditView| v.set_content(content.to_string()))
dialog.call_on_name(view_id, |v: &mut views::EditView| v.set_content(content.to_string()))
.expect("missing EditView");
}
dialog.call_on_id("description",
dialog.call_on_name("description",
|v: &mut views::TextArea| v.set_content(camera.description.to_string()))
.expect("missing TextArea");
dialog.title("Edit camera")
@ -365,7 +365,7 @@ fn edit_camera_dialog(db: &Arc<db::Database>, siv: &mut Cursive, item: &Option<i
})
} else {
for t in &db::ALL_STREAM_TYPES {
dialog.call_on_id(&format!("{}_usage_cap", t.as_str()),
dialog.call_on_name(&format!("{}_usage_cap", t.as_str()),
|v: &mut views::TextView| v.set_content("<new>"));
}
dialog.title("Add camera")

View File

@ -89,20 +89,20 @@ fn edit_limit(model: &RefCell<Model>, siv: &mut Cursive, id: i32, content: &str)
if delta != 0 {
let prev_over = model.total_retain > model.fs_capacity;
model.total_retain += delta;
siv.find_id::<views::TextView>("total_retain")
siv.find_name::<views::TextView>("total_retain")
.unwrap()
.set_content(encode_size(model.total_retain));
let now_over = model.total_retain > model.fs_capacity;
if now_over != prev_over {
model.errors += if now_over { 1 } else { -1 };
siv.find_id::<views::TextView>("total_ok")
siv.find_name::<views::TextView>("total_ok")
.unwrap()
.set_content(if now_over { "*" } else { " " });
}
}
if new_value.is_none() != stream.retain.is_none() {
model.errors += if new_value.is_none() { 1 } else { -1 };
siv.find_id::<views::TextView>(&format!("{}_ok", id))
siv.find_name::<views::TextView>(&format!("{}_ok", id))
.unwrap()
.set_content(if new_value.is_none() { "*" } else { " " });
}
@ -110,7 +110,7 @@ fn edit_limit(model: &RefCell<Model>, siv: &mut Cursive, id: i32, content: &str)
debug!("model.errors = {}", model.errors);
if (model.errors == 0) != (old_errors == 0) {
trace!("toggling change state: errors={}", model.errors);
siv.find_id::<views::Button>("change")
siv.find_name::<views::Button>("change")
.unwrap()
.set_enabled(model.errors == 0);
}
@ -124,7 +124,7 @@ fn edit_record(model: &RefCell<Model>, id: i32, record: bool) {
}
fn confirm_deletion(model: &RefCell<Model>, siv: &mut Cursive, to_delete: i64) {
let typed = siv.find_id::<views::EditView>("confirm")
let typed = siv.find_name::<views::EditView>("confirm")
.unwrap()
.get_content();
debug!("confirm, typed: {} vs expected: {}", typed.as_str(), to_delete);
@ -175,7 +175,7 @@ fn press_change(model: &Rc<RefCell<Model>>, siv: &mut Cursive) {
.child(views::EditView::new().on_submit({
let model = model.clone();
move |siv, _| confirm_deletion(&model, siv, to_delete)
}).with_id("confirm")))
}).with_name("confirm")))
.button("Confirm", {
let model = model.clone();
move |siv| confirm_deletion(&model, siv, to_delete)
@ -219,12 +219,12 @@ fn add_dir_dialog(db: &Arc<db::Database>, siv: &mut Cursive) {
let db = db.clone();
move |siv, path| add_dir(&db, siv, path)
})
.with_id("path")
.with_name("path")
.fixed_width(60)))
.button("Add", {
let db = db.clone();
move |siv| {
let path = siv.find_id::<views::EditView>("path").unwrap().get_content();
let path = siv.find_name::<views::EditView>("path").unwrap().get_content();
add_dir(&db, siv, &path)
}
})
@ -350,7 +350,7 @@ fn edit_dir_dialog(db: &Arc<db::Database>, siv: &mut Cursive, dir_id: i32) {
move |siv, _| press_change(&model, siv)
})
.fixed_width(20))
.child(views::TextView::new("").with_id(format!("{}_ok", id)).fixed_width(1)));
.child(views::TextView::new("").with_name(format!("{}_ok", id)).fixed_width(1)));
}
let over = model.borrow().total_retain > model.borrow().fs_capacity;
list.add_child(
@ -360,8 +360,8 @@ fn edit_dir_dialog(db: &Arc<db::Database>, siv: &mut Cursive, dir_id: i32) {
.child(views::TextView::new(encode_size(model.borrow().total_used))
.fixed_width(BYTES_WIDTH))
.child(views::TextView::new(encode_size(model.borrow().total_retain))
.with_id("total_retain").fixed_width(BYTES_WIDTH))
.child(views::TextView::new(if over { "*" } else { " " }).with_id("total_ok")));
.with_name("total_retain").fixed_width(BYTES_WIDTH))
.child(views::TextView::new(if over { "*" } else { " " }).with_name("total_ok")));
list.add_child(
"filesystem",
views::LinearLayout::horizontal()
@ -375,7 +375,7 @@ fn edit_dir_dialog(db: &Arc<db::Database>, siv: &mut Cursive, dir_id: i32) {
change_button.set_enabled(!over);
let mut buttons = views::LinearLayout::horizontal()
.child(views::DummyView.full_width());
buttons.add_child(change_button.with_id("change"));
buttons.add_child(change_button.with_name("change"));
buttons.add_child(views::DummyView);
buttons.add_child(views::Button::new("Cancel", |siv| { siv.pop_layer(); }));
siv.add_layer(

View File

@ -42,11 +42,11 @@ fn get_change(siv: &mut Cursive, db: &db::LockedDatabase, id: Option<i32>,
None => db::UserChange::add_user(String::new()),
};
change.username.clear();
change.username += siv.find_id::<views::EditView>("username").unwrap().get_content().as_str();
change.username += siv.find_name::<views::EditView>("username").unwrap().get_content().as_str();
match pw {
PasswordChange::Leave => {},
PasswordChange::Set => {
let pwd = siv.find_id::<views::EditView>("new_pw").unwrap().get_content();
let pwd = siv.find_name::<views::EditView>("new_pw").unwrap().get_content();
change.set_password(pwd.as_str().into());
},
PasswordChange::Clear => change.clear_password(),
@ -55,7 +55,7 @@ fn get_change(siv: &mut Cursive, db: &db::LockedDatabase, id: Option<i32>,
("perm_view_video", &mut change.permissions.view_video),
("perm_read_camera_configs", &mut change.permissions.read_camera_configs),
("perm_update_signals", &mut change.permissions.update_signals)] {
**b = siv.find_id::<views::Checkbox>(id).unwrap().is_checked();
**b = siv.find_name::<views::Checkbox>(id).unwrap().is_checked();
info!("{}: {}", id, **b);
}
change
@ -114,7 +114,7 @@ enum PasswordChange {
}
fn select_set(siv: &mut Cursive) {
siv.find_id::<views::RadioButton<PasswordChange>>("pw_set").unwrap().select();
siv.find_name::<views::RadioButton<PasswordChange>>("pw_set").unwrap().select();
}
/// Adds or updates a user.
@ -134,7 +134,7 @@ fn edit_user_dialog(db: &Arc<db::Database>, siv: &mut Cursive, item: Option<i32>
.child("id", views::TextView::new(id_str))
.child("username", views::EditView::new()
.content(username.clone())
.with_id("username"));
.with_name("username"));
let mut layout = views::LinearLayout::vertical()
.child(top_list)
.child(views::DummyView)
@ -145,21 +145,21 @@ fn edit_user_dialog(db: &Arc<db::Database>, siv: &mut Cursive, item: Option<i32>
layout.add_child(pw_group.button(PasswordChange::Clear, "Clear"));
layout.add_child(views::LinearLayout::horizontal()
.child(pw_group.button(PasswordChange::Set, "Set to:")
.with_id("pw_set"))
.with_name("pw_set"))
.child(views::DummyView)
.child(views::EditView::new()
.on_edit(|siv, _, _| select_set(siv))
.with_id("new_pw")
.with_name("new_pw")
.full_width()));
} else {
layout.add_child(pw_group.button(PasswordChange::Leave, "Leave unset"));
layout.add_child(views::LinearLayout::horizontal()
.child(pw_group.button(PasswordChange::Set, "Reset to:")
.with_id("pw_set"))
.with_name("pw_set"))
.child(views::DummyView)
.child(views::EditView::new()
.on_edit(|siv, _, _| select_set(siv))
.with_id("new_pw")
.with_name("new_pw")
.full_width()));
}
@ -171,7 +171,7 @@ fn edit_user_dialog(db: &Arc<db::Database>, siv: &mut Cursive, item: Option<i32>
("update_signals", permissions.update_signals)] {
let mut checkbox = views::Checkbox::new();
checkbox.set_checked(*b);
perms.add_child(name, checkbox.with_id(format!("perm_{}", name)));
perms.add_child(name, checkbox.with_name(format!("perm_{}", name)));
}
layout.add_child(perms);