diff --git a/Cargo.lock b/Cargo.lock index 3dcbe19..2ec5c2f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "ab_glyph_rasterizer" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9fe5e32de01730eb1f6b7f5b51c17e03e2325bf40a74f754f04f130043affff" +checksum = "330223a1aecc308757b9926e9391c9b47f8ef2dbd8aea9df88312aea18c5e8d6" [[package]] name = "adler" @@ -14,26 +14,29 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "adler32" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" - [[package]] name = "ansi_term" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" dependencies = [ "winapi", ] [[package]] name = "anyhow" -version = "1.0.40" +version = "1.0.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98161a4e3e2184da77bb14f02184cdd111e83bbbcc9979dfee3c44b9a85f5602" + +[[package]] +name = "approx" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b2cd92db5cbd74e8e5028f7e27dd7aa3090e89e4f2a197cc7c8dfb69c7063b" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] [[package]] name = "atty" @@ -48,9 +51,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "base64" @@ -69,9 +72,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "1.2.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "block" @@ -81,9 +84,9 @@ checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" [[package]] name = "bytemuck" -version = "1.5.1" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bed57e2090563b83ba8f83366628ce535a7584c9afa4c9fc0612a03925c6df58" +checksum = "2f5715e491b5a1598fc2bef5a606847b5dc1d48ea625bd3c02c00de8285591da" [[package]] name = "byteorder" @@ -93,9 +96,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cc" -version = "1.0.68" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a72c244c1ff497a746a7e1fb3d14bd08420ecda70c8f25c7112f2781652d787" +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" [[package]] name = "cfg-if" @@ -103,21 +106,11 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "chrono" -version = "0.4.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" -dependencies = [ - "num-integer", - "num-traits", -] - [[package]] name = "clap" -version = "2.33.3" +version = "2.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ "ansi_term", "atty", @@ -153,9 +146,9 @@ dependencies = [ [[package]] name = "clipboard-win" -version = "4.2.1" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4ea1881992efc993e4dc50a324cdbd03216e41bdc8385720ff47efc9bd2ca8" +checksum = "c4ab1b92798304eedc095b53942963240037c0516452cb11aeba709d420b2219" dependencies = [ "error-code", "str-buf", @@ -164,9 +157,9 @@ dependencies = [ [[package]] name = "cmake" -version = "0.1.45" +version = "0.1.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb6210b637171dfba4cda12e579ac6dc73f5165ad56133e5d72ef3131f320855" +checksum = "e8ad8cef104ac57b68b89df3208164d228503abbdce70f6880ffa3d970e7443a" dependencies = [ "cc", ] @@ -208,6 +201,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" +[[package]] +name = "const-cstr" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3d0b5ff30645a68f35ece8cea4556ca14ef8a1651455f789a099a0513532a6" + [[package]] name = "conv" version = "0.3.3" @@ -219,9 +218,9 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.9.1" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" dependencies = [ "core-foundation-sys", "libc", @@ -229,15 +228,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "core-graphics" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "269f35f69b542b80e736a20a89a05215c0ce80c2c03c514abb2e318b78379d86" +checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" dependencies = [ "bitflags", "core-foundation", @@ -272,18 +271,18 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.2.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.1" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ "cfg-if", "crossbeam-utils", @@ -291,9 +290,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ "cfg-if", "crossbeam-epoch", @@ -302,25 +301,24 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.5" +version = "0.9.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +checksum = "f916dfc5d356b0ed9dae65f1db9fc9770aa2851d2662b988ccf4fe3516e86348" dependencies = [ + "autocfg", "cfg-if", "crossbeam-utils", - "lazy_static", "memoffset", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.5" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac" dependencies = [ "cfg-if", - "lazy_static", ] [[package]] @@ -329,21 +327,11 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef8ae57c4978a2acd8b869ce6b9ca1dfe817bff704c220209fdef2c0b75a01b9" -[[package]] -name = "deflate" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73770f8e1fe7d64df17ca66ad28994a0a623ea497fa69486e14984e715c5d174" -dependencies = [ - "adler32", - "byteorder", -] - [[package]] name = "dirs" -version = "3.0.2" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" +checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" dependencies = [ "dirs-sys", ] @@ -360,9 +348,9 @@ dependencies = [ [[package]] name = "dirs-sys" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" dependencies = [ "libc", "redox_users", @@ -380,6 +368,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "dlib" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac1b7517328c04c2aa68422fc60a41b92208182142ed04a25879c26c8f878794" +dependencies = [ + "libloading", +] + [[package]] name = "dwrote" version = "0.11.0" @@ -394,15 +391,15 @@ dependencies = [ [[package]] name = "either" -version = "1.6.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "env_logger" -version = "0.8.3" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17392a012ea30ef05a610aa97dfb49496e71c9f676b27879922ea5bdf60d9d3f" +checksum = "c90bf5f19754d10198ccb95b70664fc925bd1fc090a0fd9a6ebc54acc8cd6272" dependencies = [ "atty", "humantime", @@ -412,34 +409,31 @@ dependencies = [ [[package]] name = "error-code" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5115567ac25674e0043e472be13d14e537f37ea8aa4bdc4aef0c89add1db1ff" +checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" dependencies = [ "libc", "str-buf", ] [[package]] -name = "expat-sys" -version = "2.1.6" +name = "fastrand" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" dependencies = [ - "cmake", - "pkg-config", + "instant", ] [[package]] name = "flate2" -version = "1.0.20" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd3aec53de10fe96d7d8c565eb17f2c687bb5518a2ec453b5b1252964526abe0" +checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" dependencies = [ - "cfg-if", "crc32fast", - "libc", - "miniz_oxide 0.4.4", + "miniz_oxide", ] [[package]] @@ -456,9 +450,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "font-kit" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c9a156ec38864999bc9c4156e5f3b50224d4a5578028a64e5a3875caa9ee28" +checksum = "21fe28504d371085fae9ac7a3450f0b289ab71e07c8e57baa3fb68b9e57d6ce5" dependencies = [ "bitflags", "byteorder", @@ -474,9 +468,9 @@ dependencies = [ "log", "pathfinder_geometry", "pathfinder_simd", - "servo-fontconfig", "walkdir", "winapi", + "yeslogic-fontconfig-sys", ] [[package]] @@ -528,13 +522,13 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.3" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" dependencies = [ "cfg-if", "libc", - "wasi 0.10.2+wasi-snapshot-preview1", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] @@ -553,9 +547,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.9.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "heck" @@ -568,9 +562,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ "libc", ] @@ -583,15 +577,14 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "image" -version = "0.23.14" +version = "0.24.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ffcb7e7244a9bf19d35bf2883b9c080c4ced3c07a9895572178cdb8f13f6a1" +checksum = "bd8e4fb07cf672b1642304e731ef8a6a4c7891d67bb4fd4f5ce58cd6ed86803c" dependencies = [ "bytemuck", "byteorder", "color_quant", "jpeg-decoder", - "num-iter", "num-rational", "num-traits", "png", @@ -599,51 +592,61 @@ dependencies = [ [[package]] name = "imageproc" -version = "0.22.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7923654f3ce7cb6849d5dc9e544aaeab49c508a90b56c721b046e7234c74ab53" +checksum = "b6aee993351d466301a29655d628bfc6f5a35a0d062b6160ca0808f425805fd7" dependencies = [ + "approx", "conv", "image", "itertools", - "num 0.3.1", - "rand 0.7.3", + "nalgebra", + "num", + "rand", "rand_distr", "rayon", - "rulinalg", "rusttype", ] [[package]] name = "indexmap" -version = "1.6.2" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824845a0bf897a9042383849b02c1bc219c2383772efcd5c6f9766fa4b81aef3" +checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ "autocfg", "hashbrown", ] +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "itertools" -version = "0.9.0" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] [[package]] name = "itoa" -version = "0.4.7" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" [[package]] name = "jpeg-decoder" -version = "0.1.22" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229d53d58899083193af11e15917b5640cd40b29ff475a1fe4ef725deb02d0f2" +checksum = "9478aa10f73e7528198d75109c8be5cd7d15fb530238040148d5f9a22d4c5b3b" dependencies = [ "rayon", ] @@ -655,16 +658,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] -name = "lazycell" -version = "1.3.0" +name = "libc" +version = "0.2.135" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" +checksum = "68783febc7782c6c5cb401fbda4de5a9898be1762314da0bb2c10ced61f18b0c" [[package]] -name = "libc" -version = "0.2.96" +name = "libloading" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5600b4e6efc5421841a2138a6b082e07fe12f9aaa12783d50e5d13325b26b4fc" +checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" +dependencies = [ + "cfg-if", + "winapi", +] [[package]] name = "line-wrap" @@ -675,11 +682,17 @@ dependencies = [ "safemem", ] +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + [[package]] name = "log" -version = "0.4.14" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ "cfg-if", ] @@ -695,57 +708,51 @@ dependencies = [ [[package]] name = "matrixmultiply" -version = "0.1.15" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcad67dcec2d58ff56f6292582377e6921afdf3bfbd533e26fb8900ae575e002" +checksum = "add85d4dd35074e6fedc608f8c8f513a3548619a9024b751949ef0e8e45a4d84" dependencies = [ "rawpointer", ] [[package]] name = "memoffset" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ "autocfg", ] [[package]] name = "miniz_oxide" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435" -dependencies = [ - "adler32", -] - -[[package]] -name = "miniz_oxide" -version = "0.4.4" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" dependencies = [ "adler", - "autocfg", ] [[package]] -name = "num" -version = "0.1.42" +name = "nalgebra" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" +checksum = "4fb2d0de08694bed883320212c18ee3008576bfe8c306f4c3c4a58b4876998be" dependencies = [ - "num-integer", - "num-iter", + "approx", + "matrixmultiply", + "num-complex", + "num-rational", "num-traits", + "simba", + "typenum", ] [[package]] name = "num" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b7a8e9be5e039e2ff869df49155f1c06bd01ade2117ec783e56ab0932b67a8f" +checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" dependencies = [ "num-bigint", "num-complex", @@ -757,9 +764,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.3.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d0a3d5e207573f948a9e5376662aa743a2ea13f7c50a554d7af443a73fbfeba" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" dependencies = [ "autocfg", "num-integer", @@ -768,18 +775,18 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "747d632c0c558b87dbabbe6a82f3b4ae03720d0646ac5b7b4dae89394be5f2c5" +checksum = "7ae39348c8bc5fbd7f40c727a9925f03517afd2ab27d46702108b6a7e5414c19" dependencies = [ "num-traits", ] [[package]] name = "num-integer" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ "autocfg", "num-traits", @@ -787,9 +794,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.42" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" dependencies = [ "autocfg", "num-integer", @@ -798,9 +805,9 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.3.2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ "autocfg", "num-bigint", @@ -810,23 +817,32 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" dependencies = [ "hermit-abi", "libc", ] +[[package]] +name = "num_threads" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +dependencies = [ + "libc", +] + [[package]] name = "objc" version = "0.2.7" @@ -856,23 +872,29 @@ dependencies = [ "objc", ] +[[package]] +name = "once_cell" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" + [[package]] name = "onig" -version = "6.1.1" +version = "6.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b46fd9edbc018f0be4e366c24c46db44fac49cd01c039ae85308088b089dd5" +checksum = "8c4b31c8722ad9171c6d77d3557db078cab2bd50afcc9d09c8b315c59df8ca4f" dependencies = [ "bitflags", - "lazy_static", "libc", + "once_cell", "onig_sys", ] [[package]] name = "onig_sys" -version = "69.6.0" +version = "69.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed063c96cf4c0f2e5d09324409d158b38a0a85a7b90fbd68c8cad75c495d5775" +checksum = "7b829e3d7e9cc74c7e315ee8edb185bf4190da5acde74afd7fc59c35b1f086e7" dependencies = [ "cc", "pkg-config", @@ -880,9 +902,9 @@ dependencies = [ [[package]] name = "os_info" -version = "3.0.6" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d2536ab8ff7605e8dc7044ec2f3eb0d49750cb559af9e5373c4564a3706cdd" +checksum = "c4750134fb6a5d49afc80777394ad5d95b04bc12068c6abb92fae8f43817270f" dependencies = [ "log", "serde", @@ -898,6 +920,12 @@ dependencies = [ "ttf-parser", ] +[[package]] +name = "paste" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1" + [[package]] name = "pasteboard" version = "0.1.3" @@ -923,57 +951,58 @@ dependencies = [ [[package]] name = "pathfinder_simd" version = "0.5.1" -source = "git+https://github.com/servo/pathfinder#62fbfcc91cce8695c77ea3602a38ce11bccdfdb8" +source = "git+https://github.com/servo/pathfinder#9e0331742dedfed41d9e7791a9afbead0e0fbcd5" dependencies = [ "rustc_version", ] [[package]] name = "pest" -version = "2.1.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" +checksum = "dbc7bc69c062e492337d74d59b120c274fd3d261b6bf6d3207d499b4b379c41a" dependencies = [ + "thiserror", "ucd-trie", ] [[package]] name = "pkg-config" -version = "0.3.19" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" +checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" [[package]] name = "plist" -version = "1.1.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "679104537029ed2287c216bfb942bbf723f48ee98f0aef15611634173a74ef21" +checksum = "bd39bc6cdc9355ad1dc5eeedefee696bb35c34caf21768741e81826c0bbd7225" dependencies = [ "base64", - "chrono", "indexmap", "line-wrap", "serde", + "time", "xml-rs", ] [[package]] name = "png" -version = "0.16.8" +version = "0.17.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3287920cb847dee3de33d301c463fba14dda99db24214ddf93f83d3021f4c6" +checksum = "8f0e7f4c94ec26ff209cee506314212639d6c91b80afb82984819fafce9df01c" dependencies = [ "bitflags", "crc32fast", - "deflate", - "miniz_oxide 0.3.7", + "flate2", + "miniz_oxide", ] [[package]] name = "ppv-lite86" -version = "0.2.10" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" +checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" [[package]] name = "proc-macro-error" @@ -1001,18 +1030,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.27" +version = "1.0.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038" +checksum = "94e2ef8dbfc347b10c094890f778ee2e36ca9bb4262e86dc99cd217e35f3470b" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "quote" -version = "1.0.9" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ "proc-macro2", ] @@ -1025,21 +1054,9 @@ checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ "getrandom 0.1.16", "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc 0.2.0", -] - -[[package]] -name = "rand" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e" -dependencies = [ - "libc", - "rand_chacha 0.3.0", - "rand_core 0.6.2", - "rand_hc 0.3.0", + "rand_chacha", + "rand_core", + "rand_hc", ] [[package]] @@ -1049,17 +1066,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ "ppv-lite86", - "rand_core 0.5.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.2", + "rand_core", ] [[package]] @@ -1071,22 +1078,13 @@ dependencies = [ "getrandom 0.1.16", ] -[[package]] -name = "rand_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" -dependencies = [ - "getrandom 0.2.3", -] - [[package]] name = "rand_distr" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96977acbdd3a6576fb1d27391900035bf3863d4a16422973a409b488cf29ffb2" dependencies = [ - "rand 0.7.3", + "rand", ] [[package]] @@ -1095,29 +1093,20 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rand_hc" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" -dependencies = [ - "rand_core 0.6.2", + "rand_core", ] [[package]] name = "rawpointer" -version = "0.1.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebac11a9d2e11f2af219b8b8d833b76b1ea0e054aa0e8d8e9e4cbde353bdf019" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.5.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" +checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" dependencies = [ "autocfg", "crossbeam-deque", @@ -1127,41 +1116,41 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.9.1" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" +checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" dependencies = [ "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "lazy_static", "num_cpus", ] [[package]] name = "redox_syscall" -version = "0.2.8" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "742739e41cd49414de871ea5e549afb7e2a3ac77b589bcbebe8c82fab37147fc" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ "bitflags", ] [[package]] name = "redox_users" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" +checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.3", + "getrandom 0.2.7", "redox_syscall", + "thiserror", ] [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.6.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" [[package]] name = "remove_dir_all" @@ -1172,16 +1161,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "rulinalg" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04ada202c9685e1d72a7420c578e92b358dbf807d3dfabb676a3dab9cc3bb12f" -dependencies = [ - "matrixmultiply", - "num 0.1.42", -] - [[package]] name = "rustc_version" version = "0.3.3" @@ -1203,9 +1182,18 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.5" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" + +[[package]] +name = "safe_arch" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "794821e4ccb0d9f979512f9c1973480123f9bd62a90d74ab0f9426fcf8f4a529" +dependencies = [ + "bytemuck", +] [[package]] name = "safemem" @@ -1248,18 +1236,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.126" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec7505abeacaec74ae4778d9d9328fe5a5d04253220a85c4ee022239fc996d03" +checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.126" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "963a7dbc9895aeac7ac90e74f34a5d5261828f79df35cbed41e10189d3804d43" +checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c" dependencies = [ "proc-macro2", "quote", @@ -1268,41 +1256,20 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.64" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" +checksum = "41feea4228a6f1cd09ec7a3593a682276702cd67b5273544757dae23c096f074" dependencies = [ "itoa", "ryu", "serde", ] -[[package]] -name = "servo-fontconfig" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7e3e22fe5fd73d04ebf0daa049d3efe3eae55369ce38ab16d07ddd9ac5c217c" -dependencies = [ - "libc", - "servo-fontconfig-sys", -] - -[[package]] -name = "servo-fontconfig-sys" -version = "5.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36b879db9892dfa40f95da1c38a835d41634b825fbd8c4c418093d53c24b388" -dependencies = [ - "expat-sys", - "freetype-sys", - "pkg-config", -] - [[package]] name = "shell-words" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6fa3938c99da4914afedd13bf3d79bcb6c277d1b2c398d23257a304d9e1b074" +checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" [[package]] name = "silicon" @@ -1310,7 +1277,7 @@ version = "0.4.3" dependencies = [ "anyhow", "clipboard", - "clipboard-win 4.2.1", + "clipboard-win 4.4.2", "conv", "dirs", "env_logger", @@ -1329,11 +1296,24 @@ dependencies = [ "tempfile", ] +[[package]] +name = "simba" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c48e45e5961033db030b56ad67aef22e9c908c493a6e8348c0a0f6b93433cd77" +dependencies = [ + "approx", + "num-complex", + "num-traits", + "paste", + "wide", +] + [[package]] name = "str-buf" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d44a3643b4ff9caf57abcee9c2c621d6c03d9135e0d8b589bd9afb5992cb176a" +checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" [[package]] name = "strsim" @@ -1343,9 +1323,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "structopt" -version = "0.3.21" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5277acd7ee46e63e5168a80734c9f6ee81b1367a7d8772a2d765df2a3705d28c" +checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" dependencies = [ "clap", "lazy_static", @@ -1354,9 +1334,9 @@ dependencies = [ [[package]] name = "structopt-derive" -version = "0.4.14" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ba9cdfda491b814720b6b06e0cac513d922fc407582032e8706e9f137976f90" +checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" dependencies = [ "heck", "proc-macro-error", @@ -1367,45 +1347,47 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.72" +version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82" +checksum = "3fcd952facd492f9be3ef0d0b7032a6e442ee9b361d4acc2b1d0c4aaa5f613a1" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] [[package]] name = "syntect" -version = "4.5.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bfac2b23b4d049dc9a89353b4e06bbc85a8f42020cccbe5409a115cf19031e5" +checksum = "c6c454c27d9d7d9a84c7803aaa3c50cd088d2906fe3c6e42da3209aa623576a8" dependencies = [ "bincode", "bitflags", "flate2", "fnv", "lazy_static", - "lazycell", + "once_cell", "onig", "plist", "regex-syntax", "serde", "serde_derive", "serde_json", + "thiserror", "walkdir", + "yaml-rust", ] [[package]] name = "tempfile" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ "cfg-if", + "fastrand", "libc", - "rand 0.8.3", "redox_syscall", "remove_dir_all", "winapi", @@ -1423,9 +1405,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" dependencies = [ "winapi-util", ] @@ -1440,35 +1422,72 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "thiserror" +version = "1.0.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "time" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d634a985c4d4238ec39cacaed2e7ae552fbd3c476b552c1deac3021b7d7eaf0c" +dependencies = [ + "itoa", + "libc", + "num_threads", +] + [[package]] name = "ttf-parser" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e5d7cd7ab3e47dda6e56542f4bbf3824c15234958c6e1bd6aaa347e93499fdc" +[[package]] +name = "typenum" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" + [[package]] name = "ucd-trie" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" +checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" [[package]] -name = "unicode-segmentation" -version = "1.7.1" +name = "unicode-ident" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" [[package]] -name = "unicode-width" -version = "0.1.8" +name = "unicode-segmentation" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" +checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" [[package]] -name = "unicode-xid" -version = "0.2.2" +name = "unicode-width" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] name = "vec_map" @@ -1478,9 +1497,9 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "version_check" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" @@ -1501,9 +1520,19 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wide" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae41ecad2489a1655c8ef8489444b0b113c0a0c795944a3572a0931cf7d2525c" +dependencies = [ + "bytemuck", + "safe_arch", +] [[package]] name = "winapi" @@ -1566,6 +1595,27 @@ dependencies = [ [[package]] name = "xml-rs" -version = "0.8.3" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" + +[[package]] +name = "yaml-rust" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07db065a5cf61a7e4ba64f29e67db906fb1787316516c4e6e5ff0fea1efcd8a" +checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +dependencies = [ + "linked-hash-map", +] + +[[package]] +name = "yeslogic-fontconfig-sys" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2bbd69036d397ebbff671b1b8e4d918610c181c5a16073b96f984a38d08c386" +dependencies = [ + "const-cstr", + "dlib", + "once_cell", + "pkg-config", +] diff --git a/Cargo.toml b/Cargo.toml index c480548..01d2f9f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,8 +10,8 @@ license = "MIT" edition = "2018" [dependencies] -dirs = "3.0" -imageproc = "0.22.0" +dirs = "4.0" +imageproc = "0.23.0" clipboard = "0.5.0" tempfile = "3.1.0" conv = "0.3.3" @@ -26,17 +26,17 @@ pasteboard = "0.1.3" [target.'cfg(target_os = "windows")'.dependencies] clipboard-win = "4.0.2" -image = { version = "0.23", default-features = false, features = ["jpeg", "bmp", "jpeg_rayon"] } +image = { version = "0.24", default-features = false, features = ["jpeg", "bmp", "jpeg_rayon"] } [dependencies.image] -version = "0.23" +version = "0.24" default-features = false features = ["jpeg", "png", "jpeg_rayon"] [dependencies.syntect] -version = "4.4" +version = "5.0" default-features = false -features = ["parsing", "dump-load", "regex-onig"] +features = ["parsing", "dump-load", "regex-onig", "plist-load", "yaml-load"] [dependencies.anyhow] version = "1.0" @@ -49,13 +49,13 @@ features = ["color", "wrap_help"] optional = true [dependencies.env_logger] -version = "0.8.2" +version = "0.9.1" default-features = false features = ["termcolor", "atty", "humantime"] optional = true [dependencies.font-kit] -version= "0.10" +version= "0.11" features= ["loader-freetype-default", "source-fontconfig-default"] [dependencies.harfbuzz-sys] diff --git a/assets/sync_from_bat.py b/assets/sync_from_bat.py deleted file mode 100644 index a0a255b..0000000 --- a/assets/sync_from_bat.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python -# Sync themes and syntaxes from [bat](https://github.com/sharkdp/bat/tree/master/assets) - -import os -from glob import glob -from shutil import copy - -if not os.path.exists('../../bat'): - os.system('git clone https://github.com/sharkdp/bat ../../bat') -else: - os.system('git -C ../../bat pull') - -for syntax_file in glob('../../bat/assets/syntaxes/**/*.sublime-syntax'): - copy(syntax_file, './syntaxes/') - -for theme_file in glob('../../bat/assets/themes/**/*.tmTheme'): - copy(theme_file, './themes/') - -os.system('bat cache --build --source . --target .') - -print('Finished.') diff --git a/assets/sync_from_bat.sh b/assets/sync_from_bat.sh new file mode 100755 index 0000000..4d7b3f5 --- /dev/null +++ b/assets/sync_from_bat.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +if [[ -d ../../bat ]]; then + git -C ../../bat pull +else + git clone --recurse-submodules https://github.com/sharkdp/bat ../../bat +fi + +rm -rf ./syntaxes/* ./themes/* +cp -r ../../bat/assets/syntaxes/* ./syntaxes/ +cp -r ../../bat/assets/themes/* ./themes/ + +silicon --build-cache . + +echo Finished. \ No newline at end of file diff --git a/assets/syntaxes.bin b/assets/syntaxes.bin index 0f3b7f2..e9b02df 100644 Binary files a/assets/syntaxes.bin and b/assets/syntaxes.bin differ diff --git a/assets/themes.bin b/assets/themes.bin index b5a173e..6311878 100644 Binary files a/assets/themes.bin and b/assets/themes.bin differ diff --git a/assets/themes/Dracula.tmTheme b/assets/themes/Dracula.tmTheme deleted file mode 100644 index c3434ec..0000000 --- a/assets/themes/Dracula.tmTheme +++ /dev/null @@ -1,940 +0,0 @@ - - - - - - - - name - Dracula - settings - - - settings - - background - #282a36 - caret - #f8f8f0 - block_caret - #999a9e - foreground - #f8f8f2 - invisibles - #3B3A32 - lineHighlight - #44475a - selection - #44475a - findHighlight - #effb7b - findHighlightForeground - #000000 - selectionBorder - #222218 - activeGuide - #9D550FB0 - bracketsForeground - #F8F8F2A5 - bracketsOptions - underline - bracketContentsForeground - #F8F8F2A5 - bracketContentsOptions - underline - tagsOptions - stippled_underline - - - - name - Comment - scope - comment - settings - - foreground - #6272a4 - fontStyle - - - - - name - String - scope - string - settings - - foreground - #f1fa8c - - - - name - Number - scope - constant.numeric - settings - - foreground - #bd93f9 - - - - name - Built-in constant - scope - constant.language - settings - - foreground - #bd93f9 - - - - name - User-defined constant - scope - constant.character, constant.other - settings - - foreground - #bd93f9 - - - - name - Variable - scope - variable - settings - - fontStyle - - - - - name - Ruby's @variable - scope - variable.other.readwrite.instance - settings - - fontStyle - - foreground - #ffb86c - - - - name - String interpolation - scope - constant.character.escaped, constant.character.escape, string source, string source.ruby - settings - - fontStyle - - foreground - #ff79c6 - - - - name - Ruby Regexp - scope - source.ruby string.regexp.classic.ruby,source.ruby string.regexp.mod-r.ruby - settings - - fontStyle - - foreground - #ff5555 - - - - name - Keyword - scope - keyword - settings - - foreground - #ff79c6 - - - - name - Storage - scope - storage - settings - - fontStyle - - foreground - #ff79c6 - - - - name - Storage type - scope - storage.type - settings - - fontStyle - italic - foreground - #8be9fd - - - - name - Storage Type Namespace - scope - storage.type.namespace - settings - - fontStyle - italic - foreground - #8be9fd - - - - name - Storage Type Class - scope - storage.type.class - settings - - fontStyle - italic - foreground - #ff79c6 - - - - name - Class name - scope - entity.name.class - settings - - fontStyle - underline - foreground - #8be9fd - - - - name - Meta Path - scope - meta.path - settings - - fontStyle - underline - foreground - #66d9ef - - - - name - Inherited class - scope - entity.other.inherited-class - settings - - fontStyle - italic underline - foreground - #8be9fd - - - - name - Function name - scope - entity.name.function - settings - - fontStyle - - foreground - #50fa7b - - - - name - Function argument - scope - variable.parameter - settings - - fontStyle - italic - foreground - #ffb86c - - - - name - Tag name - scope - entity.name.tag - settings - - fontStyle - - foreground - #ff79c6 - - - - name - Tag attribute - scope - entity.other.attribute-name - settings - - fontStyle - - foreground - #50fa7b - - - - name - Library function - scope - support.function - settings - - fontStyle - - foreground - #8be9fd - - - - name - Library constant - scope - support.constant - settings - - fontStyle - - foreground - #6be5fd - - - - name - Library class/type - scope - support.type, support.class - settings - - fontStyle - italic - foreground - #66d9ef - - - - name - Library variable - scope - support.other.variable - settings - - fontStyle - - - - - name - Support Other Namespace - scope - support.other.namespace - settings - - fontStyle - italic - foreground - #66d9ef - - - - name - Invalid - scope - invalid - settings - - background - #ff79c6 - fontStyle - - foreground - #F8F8F0 - - - - name - Invalid deprecated - scope - invalid.deprecated - settings - - background - #bd93f9 - foreground - #F8F8F0 - - - - name - JSON String - scope - meta.structure.dictionary.json string.quoted.double.json - settings - - foreground - #CFCFC2 - - - - name - diff.header - scope - meta.diff, meta.diff.header - settings - - foreground - #6272a4 - - - - name - diff.deleted - scope - markup.deleted - settings - - foreground - #ff79c6 - - - - name - diff.inserted - scope - markup.inserted - settings - - foreground - #50fa7b - - - - name - diff.changed - scope - markup.changed - settings - - foreground - #E6DB74 - - - - scope - constant.numeric.line-number.find-in-files - match - settings - - foreground - #bd93f9 - - - - scope - entity.name.filename - settings - - foreground - #E6DB74 - - - - scope - message.error - settings - - foreground - #F83333 - - - - name - JSON Punctuation - scope - punctuation.definition.string.begin.json - meta.structure.dictionary.value.json, punctuation.definition.string.end.json - meta.structure.dictionary.value.json - settings - - foreground - #EEEEEE - - - - name - JSON Structure - scope - meta.structure.dictionary.json string.quoted.double.json - settings - - foreground - #8be9fd - - - - name - JSON String - scope - meta.structure.dictionary.value.json string.quoted.double.json - settings - - foreground - #f1fa8c - - - - name - JSON: 6 deep - scope - meta meta meta meta meta meta meta.structure.dictionary.value string - settings - - foreground - #50fa7b - - - - name - JSON: 5 deep - scope - meta meta meta meta meta meta.structure.dictionary.value string - settings - - foreground - #ffb86c - - - - name - JSON: 4 deep - scope - meta meta meta meta meta.structure.dictionary.value string - settings - - foreground - #ff79c6 - - - - name - JSON: 3 deep - scope - meta meta meta meta.structure.dictionary.value string - settings - - foreground - #bd93f9 - - - - name - JSON: 2 deep - scope - meta meta meta.structure.dictionary.value string - settings - - foreground - #50fa7b - - - - name - JSON: 1 deep - scope - meta meta.structure.dictionary.value string - settings - - foreground - #ffb86c - - - - - - name - Markup: strike - scope - markup.strike - settings - - fontStyle - italic - foreground - #FFB86C - - - - name - Markup: bold - scope - markup.bold - settings - - fontStyle - bold - foreground - #FFB86C - - - - name - Markup: italic - scope - markup.italic - settings - - fontStyle - italic - foreground - #FFB86C - - - - name - Markdown: heading - scope - markup.heading - settings - - foreground - #8BE9FD - - - - name - Markdown: List Items Punctuation - scope - punctuation.definition.list_item.markdown - settings - - foreground - #FF79C6 - - - - name - Markdown: Blockquote - scope - markup.quote - settings - - fontStyle - italic - foreground - #6272A4 - - - - name - Markdown: Blockquote Punctuation - scope - punctuation.definition.blockquote.markdown - settings - - fontStyle - italic - background - #6272A4 - foreground - #6272A4 - - - - name - Markdown: Separator - scope - meta.separator - settings - - foreground - #6272A4 - - - - name - Markup: raw inline - scope - text.html.markdown markup.raw.inline - settings - - foreground - #50FA7B - - - - name - Markup: underline - scope - markup.underline - settings - - fontStyle - underline - foreground - #BD93F9 - - - - name - Markup: Raw block - scope - markup.raw.block - settings - - foreground - #CFCFC2 - - - - name - Markdown: Raw Block fenced source - scope - markup.raw.block.fenced.markdown source - settings - - foreground - #F8F8F2 - - - - name - Markdown: Fenced Bode Block - scope - punctuation.definition.fenced.markdown, variable.language.fenced.markdown - settings - - fontStyle - italic - foreground - #6272A4 - - - - name - Markdown: Fenced Language - scope - variable.language.fenced.markdown - settings - - fontStyle - italic - foreground - #6272A4 - - - - name - Punctuation Accessor - scope - punctuation.accessor - settings - - foreground - #FF79C6 - - - - name - Meta Function Return Type - scope - meta.function.return-type - settings - - foreground - #FF79C6 - - - - name - Punctuation Section Block Begin - scope - punctuation.section.block.begin - settings - - foreground - #ffffff - - - - name - Punctuation Section Block End - scope - punctuation.section.block.end - settings - - foreground - #ffffff - - - - name - Punctuation Section Embedded Begin - scope - punctuation.section.embedded.begin - settings - - foreground - #ff79c6 - - - - name - Punctuation Section Embedded End - scope - punctuation.section.embedded.end - settings - - foreground - #ff79c6 - - - - name - Punctuation Separator Namespace - scope - punctuation.separator.namespace - settings - - foreground - #ff79c6 - - - - name - Variable Function - scope - variable.function - settings - - foreground - #50fa7b - - - - name - Variable Other - scope - variable.other - settings - - foreground - #ffffff - - - - name - Variable Language - scope - variable.language - settings - - foreground - #bd93f9 - - - - name - Entity Name Module Ruby - scope - entity.name.module.ruby - settings - - foreground - #8be9fd - - - - name - Entity Name Constant Ruby - scope - entity.name.constant.ruby - settings - - foreground - #bd93f9 - - - - name - Support Function Builtin Ruby - scope - support.function.builtin.ruby - settings - - foreground - #ffffff - - - - name - Storage Type Namespace CS - scope - storage.type.namespace.cs - settings - - foreground - #ff79c6 - - - - name - Entity Name Namespace CS - scope - entity.name.namespace.cs - settings - - foreground - #8be9fd - - - - uuid - 83091B89-765E-4F0D-9275-0EC6CB084126 - colorSpaceName - sRGB - semanticClass - theme.dracula - author - Zeno Rocha - - diff --git a/src/assets.rs b/src/assets.rs new file mode 100644 index 0000000..bd5741f --- /dev/null +++ b/src/assets.rs @@ -0,0 +1,50 @@ +use std::path::Path; + +use crate::directories::PROJECT_DIRS; +use anyhow::Result; +use syntect::dumps; +use syntect::highlighting::ThemeSet; +use syntect::parsing::{SyntaxSet}; + +const DEFAULT_SYNTAXSET: &'static [u8] = include_bytes!("../assets/syntaxes.bin"); +const DEFAULT_THEMESET: &'static [u8] = include_bytes!("../assets/themes.bin"); + +pub struct HighlightingAssets { + pub syntax_set: SyntaxSet, + pub theme_set: ThemeSet, +} + +impl HighlightingAssets { + pub fn new() -> Self { + Self::from_dump_file().unwrap_or_else(|_| Self { + syntax_set: dumps::from_binary(DEFAULT_SYNTAXSET), + theme_set: dumps::from_binary(DEFAULT_THEMESET), + }) + } + + pub fn from_dump_file() -> Result { + let cache_dir = PROJECT_DIRS.cache_dir(); + Ok(Self { + syntax_set: dumps::from_dump_file(cache_dir.join("syntaxes.bin"))?, + theme_set: dumps::from_dump_file(cache_dir.join("themes.bin"))?, + }) + } + + pub fn add_from_folder>(&mut self, path: P) -> Result<()> { + let path = path.as_ref(); + self.theme_set + .add_from_folder(path.join("themes"))?; + let mut builder = self.syntax_set + .clone() + .into_builder(); + builder.add_from_folder(path.join("syntaxes"), true)?; + self.syntax_set = builder.build(); + Ok(()) + } + + pub fn dump_to_file(&self) -> Result<()> { + dumps::dump_to_file(&self.syntax_set, "./syntaxes.bin")?; + dumps::dump_to_file(&self.theme_set, "./themes.bin")?; + Ok(()) + } +} diff --git a/src/bin/silicon/config.rs b/src/bin/silicon/config.rs index 1ea40e6..bfc0d28 100644 --- a/src/bin/silicon/config.rs +++ b/src/bin/silicon/config.rs @@ -19,7 +19,7 @@ pub fn config_file() -> PathBuf { .ok() .map(PathBuf::from) .filter(|config_path| config_path.is_file()) - .unwrap_or_else(|| PROJECT_DIRS.config_dir().join("config")) + .unwrap_or_else(|| PROJECT_DIRS.config_dir().to_owned()) } pub fn get_args_from_config_file() -> Vec { @@ -142,7 +142,7 @@ pub struct Config { short, long, value_name = "PATH", - required_unless_one = &["config-file", "list-fonts", "list-themes", "to-clipboard"] + required_unless_one = &["config-file", "list-fonts", "list-themes", "to-clipboard", "build-cache"] )] pub output: Option, @@ -195,12 +195,16 @@ pub struct Config { #[structopt(long, value_name = "THEME", default_value = "Dracula")] pub theme: String, - // Copy the output image to clipboard. + /// Copy the output image to clipboard. #[structopt(short = "c", long)] pub to_clipboard: bool, // Draw a custom text on the bottom right corner // #[structopt(long)] // watermark: Option, + + /// build syntax definition and theme cache + #[structopt(long)] + pub build_cache: Option, } impl Config { diff --git a/src/bin/silicon/main.rs b/src/bin/silicon/main.rs index 1e917be..8f8e2e0 100644 --- a/src/bin/silicon/main.rs +++ b/src/bin/silicon/main.rs @@ -19,7 +19,7 @@ use {image::ImageOutputFormat, std::process::Command}; mod config; use crate::config::{config_file, get_args_from_config_file}; use config::Config; -use silicon::utils::init_syntect; +use silicon::assets::HighlightingAssets; #[cfg(target_os = "linux")] pub fn dump_image_to_clipboard(image: &DynamicImage) -> Result<(), Error> { @@ -81,9 +81,15 @@ fn run() -> Result<(), Error> { args.extend(args_cli); let config: Config = Config::from_iter(args); - let (ps, ts) = init_syntect(); + let ha = HighlightingAssets::new(); + let (ps, ts) = (ha.syntax_set, ha.theme_set); - if config.list_themes { + if let Some(path) = config.build_cache { + let mut ha = HighlightingAssets::new(); + ha.add_from_folder(path)?; + ha.dump_to_file()?; + return Ok(()) + } else if config.list_themes { for i in ts.themes.keys() { println!("{}", i); } @@ -105,8 +111,8 @@ fn run() -> Result<(), Error> { let mut h = HighlightLines::new(syntax, &theme); let highlight = LinesWithEndings::from(&code) - .map(|line| h.highlight(line, &ps)) - .collect::>(); + .map(|line| h.highlight_line(line, &ps)) + .collect::, _>>()?; let mut formatter = config.get_formatter()?; diff --git a/src/blur.rs b/src/blur.rs index 32415da..2b2e7fc 100644 --- a/src/blur.rs +++ b/src/blur.rs @@ -9,7 +9,7 @@ use image::RgbaImage; use rayon::prelude::*; #[derive(Copy, Clone)] -struct SharedMutPtr<>(*mut [[u8; 4]]); +struct SharedMutPtr(*mut [[u8; 4]]); unsafe impl Sync for SharedMutPtr {} diff --git a/src/directories.rs b/src/directories.rs index a098c63..952e565 100644 --- a/src/directories.rs +++ b/src/directories.rs @@ -28,10 +28,9 @@ impl SiliconProjectDirs { }) } - // silicon use bat's cache directory fn get_cache_dir() -> Option { - // on all OS prefer BAT_CACHE_PATH if set - let cache_dir_op = env::var_os("BAT_CACHE_PATH").map(PathBuf::from); + // on all OS prefer SILICON_CACHE_PATH if set + let cache_dir_op = env::var_os("SILICON_CACHE_PATH").map(PathBuf::from); if cache_dir_op.is_some() { return cache_dir_op; } @@ -45,7 +44,7 @@ impl SiliconProjectDirs { #[cfg(not(target_os = "macos"))] let cache_dir_op = dirs::cache_dir(); - cache_dir_op.map(|d| d.join("bat")) + cache_dir_op.map(|d| d.join("silicon")) } pub fn cache_dir(&self) -> &Path { diff --git a/src/lib.rs b/src/lib.rs index a9076dc..439d1bd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,8 +7,10 @@ //! use syntect::util::LinesWithEndings; //! use silicon::utils::{init_syntect, ShadowAdder}; //! use silicon::formatter::ImageFormatterBuilder; +//! use silicon::assets::HighlightingAssets; //! -//! let (ps, ts) = init_syntect(); +//! let ha = HighlightingAssets::new(); +//! let (ps, ts) = (ha.syntax_set, ha.theme_set); //! let code = r#"fn main() { //! println!("Hello, world!"); //! } @@ -34,6 +36,7 @@ #[macro_use] extern crate log; +pub mod assets; pub mod blur; pub mod directories; pub mod error; diff --git a/src/utils.rs b/src/utils.rs index d013e46..29e9515 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,39 +1,9 @@ -use crate::directories::PROJECT_DIRS; use crate::error::ParseColorError; -use image::imageops::{crop, resize, FilterType}; +use image::imageops::{crop_imm, resize, FilterType}; use image::Pixel; use image::{DynamicImage, GenericImage, GenericImageView, Rgba, RgbaImage}; use imageproc::drawing::{draw_filled_rect_mut, draw_line_segment_mut}; use imageproc::rect::Rect; -use syntect::dumps; -use syntect::highlighting::ThemeSet; -use syntect::parsing::SyntaxSet; - -pub fn read_from_bat_cache() -> Option<(SyntaxSet, ThemeSet)> { - let cache_dir = PROJECT_DIRS.cache_dir(); - let syntax_cache = cache_dir.join("syntaxes.bin"); - let theme_cache = cache_dir.join("themes.bin"); - if syntax_cache.exists() && theme_cache.exists() { - if let (Ok(a), Ok(b)) = ( - dumps::from_dump_file(syntax_cache), - dumps::from_dump_file(theme_cache), - ) { - return Some((a, b)); - } - } - None -} - -/// Load the default SyntaxSet and ThemeSet. -pub fn init_syntect() -> (SyntaxSet, ThemeSet) { - // try to use bat's cache - read_from_bat_cache().unwrap_or_else(|| { - ( - dumps::from_binary(include_bytes!("../assets/syntaxes.bin")), - dumps::from_binary(include_bytes!("../assets/themes.bin")), - ) - }) -} pub trait ToRgba { type Target; @@ -295,18 +265,18 @@ pub(crate) fn round_corner(image: &mut DynamicImage, radius: u32) { foreground, ); - let part = crop(&mut circle, 0, 0, radius, radius); - image.copy_from(&part, 0, 0).unwrap(); + let part = crop_imm(&mut circle, 0, 0, radius, radius); + image.copy_from(&*part, 0, 0).unwrap(); - let part = crop(&mut circle, radius + 1, 0, radius, radius); - image.copy_from(&part, width - radius, 0).unwrap(); + let part = crop_imm(&mut circle, radius + 1, 0, radius, radius); + image.copy_from(&*part, width - radius, 0).unwrap(); - let part = crop(&mut circle, 0, radius + 1, radius, radius); - image.copy_from(&part, 0, height - radius).unwrap(); + let part = crop_imm(&mut circle, 0, radius + 1, radius, radius); + image.copy_from(&*part, 0, height - radius).unwrap(); - let part = crop(&mut circle, radius + 1, radius + 1, radius, radius); + let part = crop_imm(&mut circle, radius + 1, radius + 1, radius, radius); image - .copy_from(&part, width - radius, height - radius) + .copy_from(&*part, width - radius, height - radius) .unwrap(); }