Selaa lähdekoodia

Fix some clippy warnings, update dependencies

Johannes Hofmann 8 vuotta sitten
vanhempi
commit
7a1d847cf4
3 muutettua tiedostoa jossa 38 lisäystä ja 39 poistoa
  1. 34
    33
      Cargo.lock
  2. 3
    5
      src/main.rs
  3. 1
    1
      src/map_view_gl.rs

+ 34
- 33
Cargo.lock Näytä tiedosto

@@ -28,7 +28,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
28 28
 dependencies = [
29 29
  "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
30 30
  "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
31
- "winapi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
31
+ "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
32 32
 ]
33 33
 
34 34
 [[package]]
@@ -40,7 +40,7 @@ dependencies = [
40 40
  "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
41 41
  "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
42 42
  "rustc-demangle 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
43
- "winapi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
43
+ "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
44 44
 ]
45 45
 
46 46
 [[package]]
@@ -110,7 +110,7 @@ name = "cgl"
110 110
 version = "0.2.1"
111 111
 source = "registry+https://github.com/rust-lang/crates.io-index"
112 112
 dependencies = [
113
- "gleam 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)",
113
+ "gleam 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)",
114 114
  "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
115 115
 ]
116 116
 
@@ -125,7 +125,7 @@ dependencies = [
125 125
 
126 126
 [[package]]
127 127
 name = "clap"
128
-version = "2.29.1"
128
+version = "2.29.2"
129 129
 source = "registry+https://github.com/rust-lang/crates.io-index"
130 130
 dependencies = [
131 131
  "ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -229,15 +229,15 @@ dependencies = [
229 229
 name = "deltamap"
230 230
 version = "0.1.0"
231 231
 dependencies = [
232
- "clap 2.29.1 (registry+https://github.com/rust-lang/crates.io-index)",
233
- "env_logger 0.5.0-rc.2 (registry+https://github.com/rust-lang/crates.io-index)",
232
+ "clap 2.29.2 (registry+https://github.com/rust-lang/crates.io-index)",
233
+ "env_logger 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
234 234
  "gl 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
235 235
  "gl_generator 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
236 236
  "image 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)",
237 237
  "linked-hash-map 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
238 238
  "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
239 239
  "osmpbf 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
240
- "reqwest 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
240
+ "reqwest 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)",
241 241
  "servo-glutin 0.13.4 (registry+https://github.com/rust-lang/crates.io-index)",
242 242
  "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
243 243
  "xdg 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -272,9 +272,10 @@ dependencies = [
272 272
 
273 273
 [[package]]
274 274
 name = "env_logger"
275
-version = "0.5.0-rc.2"
275
+version = "0.5.2"
276 276
 source = "registry+https://github.com/rust-lang/crates.io-index"
277 277
 dependencies = [
278
+ "atty 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
278 279
  "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
279 280
  "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
280 281
  "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -377,7 +378,7 @@ dependencies = [
377 378
 
378 379
 [[package]]
379 380
 name = "gleam"
380
-version = "0.4.18"
381
+version = "0.4.19"
381 382
 source = "registry+https://github.com/rust-lang/crates.io-index"
382 383
 dependencies = [
383 384
  "gl_generator 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -386,19 +387,19 @@ dependencies = [
386 387
 
387 388
 [[package]]
388 389
 name = "httparse"
389
-version = "1.2.3"
390
+version = "1.2.4"
390 391
 source = "registry+https://github.com/rust-lang/crates.io-index"
391 392
 
392 393
 [[package]]
393 394
 name = "hyper"
394
-version = "0.11.13"
395
+version = "0.11.14"
395 396
 source = "registry+https://github.com/rust-lang/crates.io-index"
396 397
 dependencies = [
397 398
  "base64 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
398 399
  "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
399 400
  "futures 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
400 401
  "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
401
- "httparse 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
402
+ "httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
402 403
  "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
403 404
  "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
404 405
  "mime 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -418,7 +419,7 @@ version = "0.1.2"
418 419
 source = "registry+https://github.com/rust-lang/crates.io-index"
419 420
 dependencies = [
420 421
  "futures 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
421
- "hyper 0.11.13 (registry+https://github.com/rust-lang/crates.io-index)",
422
+ "hyper 0.11.14 (registry+https://github.com/rust-lang/crates.io-index)",
422 423
  "native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
423 424
  "tokio-core 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
424 425
  "tokio-io 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -601,7 +602,7 @@ version = "0.6.2"
601 602
 source = "registry+https://github.com/rust-lang/crates.io-index"
602 603
 dependencies = [
603 604
  "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
604
- "winapi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
605
+ "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
605 606
 ]
606 607
 
607 608
 [[package]]
@@ -928,15 +929,15 @@ dependencies = [
928 929
 
929 930
 [[package]]
930 931
 name = "reqwest"
931
-version = "0.8.2"
932
+version = "0.8.3"
932 933
 source = "registry+https://github.com/rust-lang/crates.io-index"
933 934
 dependencies = [
934 935
  "bytes 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
935 936
  "futures 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
936
- "hyper 0.11.13 (registry+https://github.com/rust-lang/crates.io-index)",
937
+ "hyper 0.11.14 (registry+https://github.com/rust-lang/crates.io-index)",
937 938
  "hyper-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
938 939
  "libflate 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
939
- "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
940
+ "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
940 941
  "mime_guess 2.0.0-alpha.3 (registry+https://github.com/rust-lang/crates.io-index)",
941 942
  "native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
942 943
  "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -965,7 +966,7 @@ version = "0.1.10"
965 966
 source = "registry+https://github.com/rust-lang/crates.io-index"
966 967
 dependencies = [
967 968
  "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
968
- "winapi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
969
+ "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
969 970
 ]
970 971
 
971 972
 [[package]]
@@ -1154,7 +1155,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1154 1155
 dependencies = [
1155 1156
  "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
1156 1157
  "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
1157
- "winapi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
1158
+ "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
1158 1159
 ]
1159 1160
 
1160 1161
 [[package]]
@@ -1327,11 +1328,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1327 1328
 
1328 1329
 [[package]]
1329 1330
 name = "winapi"
1330
-version = "0.3.3"
1331
+version = "0.3.4"
1331 1332
 source = "registry+https://github.com/rust-lang/crates.io-index"
1332 1333
 dependencies = [
1333
- "winapi-i686-pc-windows-gnu 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
1334
- "winapi-x86_64-pc-windows-gnu 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
1334
+ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
1335
+ "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
1335 1336
 ]
1336 1337
 
1337 1338
 [[package]]
@@ -1341,12 +1342,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1341 1342
 
1342 1343
 [[package]]
1343 1344
 name = "winapi-i686-pc-windows-gnu"
1344
-version = "0.3.2"
1345
+version = "0.4.0"
1345 1346
 source = "registry+https://github.com/rust-lang/crates.io-index"
1346 1347
 
1347 1348
 [[package]]
1348 1349
 name = "winapi-x86_64-pc-windows-gnu"
1349
-version = "0.3.2"
1350
+version = "0.4.0"
1350 1351
 source = "registry+https://github.com/rust-lang/crates.io-index"
1351 1352
 
1352 1353
 [[package]]
@@ -1409,7 +1410,7 @@ dependencies = [
1409 1410
 "checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de"
1410 1411
 "checksum cgl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "86765cb42c2a2c497e142af72517c1b4d7ae5bb2f25dfa77a5c69642f2342d89"
1411 1412
 "checksum chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c20ebe0b2b08b0aeddba49c609fe7957ba2e33449882cb186a180bc60682fa9"
1412
-"checksum clap 2.29.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8f4a2b3bb7ef3c672d7c13d15613211d5a6976b6892c598b0fcb5d40765f19c2"
1413
+"checksum clap 2.29.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4151c5790817c7d21bbdc6c3530811f798172915f93258244948b93ba19604a6"
1413 1414
 "checksum coco 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c06169f5beb7e31c7c67ebf5540b8b472d23e3eade3b2ec7d1f5b504a85f91bd"
1414 1415
 "checksum cocoa 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac0d785ff4faf0ff23d7b5561346bb50dc7ef9a11cb0e65e07ef776b7752938f"
1415 1416
 "checksum color_quant 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a475fc4af42d83d28adf72968d9bcfaf035a1a9381642d8e85d8a04957767b0d"
@@ -1424,7 +1425,7 @@ dependencies = [
1424 1425
 "checksum dwmapi-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b44b6442aeab12e609aee505bd1066bdfd36b79c3fe5aad604aae91537623e76"
1425 1426
 "checksum either 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "740178ddf48b1a9e878e6d6509a1442a2d42fd2928aae8e7a6f8a36fb01981b3"
1426 1427
 "checksum enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be4551092f4d519593039259a9ed8daedf0da12e5109c5280338073eaeb81180"
1427
-"checksum env_logger 0.5.0-rc.2 (registry+https://github.com/rust-lang/crates.io-index)" = "65f98e626dd2495a575f6036dd73c9176b656dd73d8bdf8119f2cf5223a2ec4a"
1428
+"checksum env_logger 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f98112cf5e30982be3514040871a6f310504a7406ce1936691649353ec0607e9"
1428 1429
 "checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3"
1429 1430
 "checksum flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)" = "e6234dd4468ae5d1e2dbb06fe2b058696fdc50a339c68a393aefbf00bc81e423"
1430 1431
 "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
@@ -1437,9 +1438,9 @@ dependencies = [
1437 1438
 "checksum gif 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2e41945ba23db3bf51b24756d73d81acb4f28d85c3dccc32c6fae904438c25f"
1438 1439
 "checksum gl 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8067824a3f3794cb508bf89a1937bada36a9f235680911fd30d919ebcd12aa36"
1439 1440
 "checksum gl_generator 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4f5c19cde55637681450c92f7a05ea16c78e2b6d0587e601ec1ebdab6960854b"
1440
-"checksum gleam 0.4.18 (registry+https://github.com/rust-lang/crates.io-index)" = "437fdf7818d999b299e159611d7bb733fc7bcee683640ec2275b7d38a70688dd"
1441
-"checksum httparse 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "af2f2dd97457e8fb1ae7c5a420db346af389926e36f43768b96f101546b04a07"
1442
-"checksum hyper 0.11.13 (registry+https://github.com/rust-lang/crates.io-index)" = "7af072bf3403369fd4339d550a7612c94ce681a22ca3a5455e68983fa4b3648c"
1441
+"checksum gleam 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)" = "4f756699879522bc654ecc44ad42ad14c59803c2dacfa5a67a7fc27257a8b4e9"
1442
+"checksum httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2f407128745b78abc95c0ffbe4e5d37427fdc0d45470710cfef8c44522a2e37"
1443
+"checksum hyper 0.11.14 (registry+https://github.com/rust-lang/crates.io-index)" = "f57f74deb81fb91b776012ed7605e96b1ffb88c4fd5c031ce5c90534b604a6e0"
1443 1444
 "checksum hyper-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c81fa95203e2a6087242c38691a0210f23e9f3f8f944350bd676522132e2985"
1444 1445
 "checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d"
1445 1446
 "checksum image 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d1576ffa01849c91b484b95c01d54dddc242b4d50923eaa2d4d74a58c4b9e8fd"
@@ -1499,7 +1500,7 @@ dependencies = [
1499 1500
 "checksum regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "744554e01ccbd98fff8c457c3b092cd67af62a555a43bfe97ae8a0451f7799fa"
1500 1501
 "checksum regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8e931c58b93d86f080c734bfd2bce7dd0079ae2331235818133c8be7f422e20e"
1501 1502
 "checksum relay 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f301bafeb60867c85170031bdb2fcf24c8041f33aee09e7b116a58d4e9f781c5"
1502
-"checksum reqwest 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3161ca63fd11ce36c7718af239e6492a25a3dbfcec54240f959b9d816cf42413"
1503
+"checksum reqwest 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8080379de728e9bf2be6bd5b52348978a5525e7d4a25f106ce73953fe7e810d9"
1503 1504
 "checksum rustc-demangle 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "aee45432acc62f7b9a108cc054142dac51f979e69e71ddce7d6fc7adf29e817e"
1504 1505
 "checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f"
1505 1506
 "checksum schannel 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "acece75e0f987c48863a6c792ec8b7d6c4177d4a027f8ccc72f849794f437016"
@@ -1547,10 +1548,10 @@ dependencies = [
1547 1548
 "checksum version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6b772017e347561807c1aa192438c5fd74242a670a6cffacc40f2defd1dc069d"
1548 1549
 "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
1549 1550
 "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
1550
-"checksum winapi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b09fb3b6f248ea4cd42c9a65113a847d612e17505d6ebd1f7357ad68a8bf8693"
1551
+"checksum winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "04e3bd221fcbe8a271359c04f21a76db7d0c6028862d1bb5512d85e1e2eb5bb3"
1551 1552
 "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
1552
-"checksum winapi-i686-pc-windows-gnu 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ec6667f60c23eca65c561e63a13d81b44234c2e38a6b6c959025ee907ec614cc"
1553
-"checksum winapi-x86_64-pc-windows-gnu 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "98f12c52b2630cd05d2c3ffd8e008f7f48252c042b4871c72aed9dc733b96668"
1553
+"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
1554
+"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
1554 1555
 "checksum wincolor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a39ee4464208f6430992ff20154216ab2357772ac871d994c51628d60e58b8b0"
1555 1556
 "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e"
1556 1557
 "checksum x11-dl 2.17.2 (registry+https://github.com/rust-lang/crates.io-index)" = "28ec50063128cfdbdfe683b0504a3740e07b779c7c75fa26e941218b5f95e098"

+ 3
- 5
src/main.rs Näytä tiedosto

@@ -196,7 +196,7 @@ fn handle_event(event: &Event, map: &mut MapViewGl, input_state: &mut InputState
196 196
 }
197 197
 
198 198
 fn dur_to_sec(dur: Duration) -> f64 {
199
-    dur.as_secs() as f64 + dur.subsec_nanos() as f64 * 1e-9
199
+    dur.as_secs() as f64 + f64::from(dur.subsec_nanos()) * 1e-9
200 200
 }
201 201
 
202 202
 fn main() {
@@ -264,11 +264,9 @@ fn main() {
264 264
         rctrl_pressed: false,
265 265
     };
266 266
 
267
-    let fps: f64 = matches.value_of("fps").map(|s| s.parse().unwrap()).unwrap_or(config.fps());
267
+    let fps: f64 = matches.value_of("fps").map(|s| s.parse().unwrap()).unwrap_or_else(|| config.fps());
268 268
     let duration_per_frame = Duration::from_millis((1000.0 / fps - 0.5).max(0.0).floor() as u64);
269
-    info!("milliseconds per frame: {}",
270
-          duration_per_frame.as_secs() as f64 * 1000.0
271
-          + duration_per_frame.subsec_nanos() as f64 * 1e-6);
269
+    info!("milliseconds per frame: {}", dur_to_sec(duration_per_frame) * 0.001);
272 270
 
273 271
     // estimated draw duration
274 272
     let mut est_draw_dur = duration_per_frame;

+ 1
- 1
src/map_view_gl.rs Näytä tiedosto

@@ -175,7 +175,7 @@ impl<'a> MapViewGl<'a> {
175 175
                 remainder_opt.map(|r| r.len()),
176 176
                 max_tiles_to_use);
177 177
 
178
-            if max_tiles_to_use <= 0 {
178
+            if max_tiles_to_use == 0 {
179 179
                 warn!("tile cache is too small for this view.");
180 180
                 return Err(num_draws);
181 181
             }