diff --git a/gui/.github/workflows/gui-ci.yml b/gui/.github/workflows/gui-ci.yml index af94719c8d5..05198c2855a 100644 --- a/gui/.github/workflows/gui-ci.yml +++ b/gui/.github/workflows/gui-ci.yml @@ -104,7 +104,7 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2021-05-12 + toolchain: nightly-2021-06-17 override: true - name: Install Prettier run: npm install --save-dev --save-exact prettier @@ -133,7 +133,7 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2021-05-12 + toolchain: nightly-2021-06-17 override: true - name: Run tests (no WASM) run: node ./run test --no-wasm --skip-version-validation @@ -154,7 +154,7 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2021-05-12 + toolchain: nightly-2021-06-17 override: true - name: Install wasm-pack (macOS) env: @@ -208,7 +208,7 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2021-05-12 + toolchain: nightly-2021-06-17 override: true - name: Install wasm-pack (macOS) env: @@ -285,7 +285,7 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: nightly-2021-05-12 + toolchain: nightly-2021-06-17 override: true - name: Install wasm-pack (macOS) env: diff --git a/gui/build/package-lock.json b/gui/build/package-lock.json index f23bca3a56c..8e15fc6ba93 100644 --- a/gui/build/package-lock.json +++ b/gui/build/package-lock.json @@ -1,481 +1,8 @@ { "name": "build-script", "version": "1.0.0", - "lockfileVersion": 2, + "lockfileVersion": 1, "requires": true, - "packages": { - "": { - "name": "build-script", - "version": "1.0.0", - "license": "MIT", - "dependencies": { - "glob": "^7.1.6", - "js-yaml": "4.0.0", - "ncp": "^2.0.0", - "semver": "7.3.4", - "yargs": "^15.3.0" - }, - "devDependencies": { - "prettier": "2.2.0", - "prettier-plugin-toml": "0.3.1" - } - }, - "node_modules/@toml-tools/lexer": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@toml-tools/lexer/-/lexer-0.3.1.tgz", - "integrity": "sha512-CCKHQb5OWpgFu47MQ2rcql4AnE9GaehNk/c1oJOyOBovED6XmdzQPXsvPSu+NJ9lToqJNoX+nLXQsB8WyQGdzQ==", - "dev": true, - "dependencies": { - "chevrotain": "4.1.1" - } - }, - "node_modules/@toml-tools/parser": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@toml-tools/parser/-/parser-0.3.1.tgz", - "integrity": "sha512-vadwVx5TkgByt19dbp/rfIUKPkDdn5werANYvziiGK9wHlqPA0BWnvOloQw/dPDxF31+Ag0+zarXJpPDdRsPPg==", - "dev": true, - "dependencies": { - "@toml-tools/lexer": "^0.3.1", - "chevrotain": "4.1.1" - } - }, - "node_modules/@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" - }, - "node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "dependencies": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, - "node_modules/balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "engines": { - "node": ">=6" - } - }, - "node_modules/chevrotain": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-4.1.1.tgz", - "integrity": "sha512-NQky1HQyiAzxsxpq4Ppt47SYO2U3JLtmfs85QPf3kYSzGBjjp5AA8kqjH8hCjGFRpaQ781QOk1ragQIOkBgUTA==", - "dev": true, - "dependencies": { - "regexp-to-ast": "0.3.5" - } - }, - "node_modules/cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/js-yaml": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", - "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/ncp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", - "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", - "bin": { - "ncp": "bin/ncp" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/prettier": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.0.tgz", - "integrity": "sha512-yYerpkvseM4iKD/BXLYUkQV5aKt4tQPqaGW6EsZjzyu0r7sVZZNPJW4Y8MyKmicp6t42XUPcBVA+H6sB3gqndw==", - "dev": true, - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/prettier-plugin-toml": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/prettier-plugin-toml/-/prettier-plugin-toml-0.3.1.tgz", - "integrity": "sha512-j47DEO/dN/acU1nSL/B7q4A4Z2SYJhpWPCLPkcmfAXIQC6A5GD6Ao/bi9HRHZ8ueIDOauqjuAQbnvRxLXMjazA==", - "dev": true, - "dependencies": { - "@toml-tools/parser": "^0.3.1", - "prettier": "^1.16.0" - } - }, - "node_modules/prettier-plugin-toml/node_modules/prettier": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", - "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", - "dev": true, - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/regexp-to-ast": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/regexp-to-ast/-/regexp-to-ast-0.3.5.tgz", - "integrity": "sha512-1CJygtdvsfNFwiyjaMLBWtg2tfEqx/jSZ8S6TV+GlNL8kiH8rb4cm5Pb7A/C2BpyM/fA8ZJEudlCwi/jvAY+Ow==", - "dev": true - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" - }, - "node_modules/semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" - }, - "node_modules/string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dependencies": { - "ansi-regex": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" - }, - "node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "node_modules/y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "node_modules/yargs": { - "version": "15.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.0.tgz", - "integrity": "sha512-g/QCnmjgOl1YJjGsnUg2SatC7NUYEiLXJqxNOQU9qSpjzGtGXda9b+OKccr1kLTy8BN9yqEyqfq5lxlwdc13TA==", - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "engines": { - "node": ">=6" - } - } - }, "dependencies": { "@toml-tools/lexer": { "version": "0.3.1", diff --git a/gui/build/workflow.js b/gui/build/workflow.js index d762e6b4999..13b02a07c37 100644 --- a/gui/build/workflow.js +++ b/gui/build/workflow.js @@ -14,7 +14,7 @@ const yaml = require('js-yaml') // ================= const NODE_VERSION = '14.15.0' -const RUST_VERSION = 'nightly-2021-05-12' +const RUST_VERSION = read_rust_toolchain_version() const WASM_PACK_VERSION = '0.9.1' const FLAG_NO_CHANGELOG_NEEDED = '[ci no changelog needed]' const FLAG_FORCE_CI_BUILD = '[ci build]' @@ -25,6 +25,10 @@ const FLAG_FORCE_CI_BUILD = '[ci build]' // === Utils === // ============= +function read_rust_toolchain_version() { + return fss.readFileSync(paths.root + "/rust-toolchain").toString().trim() +} + function job(platforms,name,steps,cfg) { if (!cfg) { cfg = {} } return { diff --git a/gui/run b/gui/run index dde3ecaaa92..ae02cf07e3e 100755 --- a/gui/run +++ b/gui/run @@ -19,7 +19,7 @@ async function init () { console.log("Checking versions of installed packages.") await cmd.check_version('node',node_lts_version) await cmd.check_version('npm',npm_lts_version) - await cmd.check_version('rustc','1.54.0-nightly',{ + await cmd.check_version('rustc','1.55.0-nightly',{ preprocess:(v)=>v.substring(6,20) }) } diff --git a/gui/rust-toolchain b/gui/rust-toolchain index adab14845b8..8398865b04c 100644 --- a/gui/rust-toolchain +++ b/gui/rust-toolchain @@ -1 +1 @@ -nightly-2021-05-12 +nightly-2021-06-17 diff --git a/gui/src/rust/ensogl/example/src/complex_shape_system.rs b/gui/src/rust/ensogl/example/src/complex_shape_system.rs index 3b69c56a067..40a53e5a3f5 100644 --- a/gui/src/rust/ensogl/example/src/complex_shape_system.rs +++ b/gui/src/rust/ensogl/example/src/complex_shape_system.rs @@ -49,7 +49,7 @@ pub fn entry_point_complex_shape_system() { let world = World::new(&web::get_html_element_by_id("root").unwrap()); let scene = world.scene(); let camera = scene.camera().clone_ref(); - let navigator = Navigator::new(&scene,&camera); + let navigator = Navigator::new(scene,&camera); let logger = Logger::new("ShapeView"); let theme_manager = theme::Manager::from(&scene.style_sheet); diff --git a/gui/src/rust/ensogl/example/src/dom_symbols.rs b/gui/src/rust/ensogl/example/src/dom_symbols.rs index c2f88b92e60..fec452aee47 100644 --- a/gui/src/rust/ensogl/example/src/dom_symbols.rs +++ b/gui/src/rust/ensogl/example/src/dom_symbols.rs @@ -85,7 +85,7 @@ pub fn entry_point_dom_symbols() { iter_to_change = 50; i = (i + 1) % 2; for (j, object) in css3d_objects.iter_mut().enumerate() { - layers[(i + j) % 2].manage(&object); + layers[(i + j) % 2].manage(object); } } iter_to_change -= 1; diff --git a/gui/src/rust/ensogl/example/src/mouse_events.rs b/gui/src/rust/ensogl/example/src/mouse_events.rs index 4c2c814fe67..691cf28b97f 100644 --- a/gui/src/rust/ensogl/example/src/mouse_events.rs +++ b/gui/src/rust/ensogl/example/src/mouse_events.rs @@ -140,7 +140,7 @@ pub fn entry_point_mouse_events() { let scene = app.display.scene(); let camera = scene.camera().clone_ref(); - let navigator = Navigator::new(&scene,&camera); + let navigator = Navigator::new(scene,&camera); std::mem::forget(shape); std::mem::forget(navigator); diff --git a/gui/src/rust/ensogl/example/src/scroll_area.rs b/gui/src/rust/ensogl/example/src/scroll_area.rs index 437296c594a..e4d7e4fea6d 100644 --- a/gui/src/rust/ensogl/example/src/scroll_area.rs +++ b/gui/src/rust/ensogl/example/src/scroll_area.rs @@ -64,7 +64,7 @@ fn init(app:&Application) { // === Scroll Area === - let scroll_area = ScrollArea::new(&app); + let scroll_area = ScrollArea::new(app); app.display.add_child(&scroll_area); scroll_area.resize(Vector2(200.0,200.0)); scroll_area.set_content_width(300.0); diff --git a/gui/src/rust/ensogl/example/src/shape_system.rs b/gui/src/rust/ensogl/example/src/shape_system.rs index 702552c7081..083bcc43e0c 100644 --- a/gui/src/rust/ensogl/example/src/shape_system.rs +++ b/gui/src/rust/ensogl/example/src/shape_system.rs @@ -43,7 +43,7 @@ pub fn entry_point_shape_system() { let world = World::new(&web::get_html_element_by_id("root").unwrap()); let scene = world.scene(); let camera = scene.camera().clone_ref(); - let navigator = Navigator::new(&scene,&camera); + let navigator = Navigator::new(scene,&camera); let sprite_system = ShapeSystem::new(&world,&shape()); let sprite = sprite_system.new_instance(); sprite.size.set(Vector2::new(300.0, 300.0)); diff --git a/gui/src/rust/ensogl/example/src/sprite_system.rs b/gui/src/rust/ensogl/example/src/sprite_system.rs index c25f71fe9ea..a824a69d786 100644 --- a/gui/src/rust/ensogl/example/src/sprite_system.rs +++ b/gui/src/rust/ensogl/example/src/sprite_system.rs @@ -18,7 +18,7 @@ pub fn entry_point_sprite_system() { let world = World::new(&web::get_html_element_by_id("root").unwrap()); let scene = world.scene(); let camera = scene.camera().clone_ref(); - let navigator = Navigator::new(&scene,&camera); + let navigator = Navigator::new(scene,&camera); let sprite_system = SpriteSystem::new(&world); let sprite2 = sprite_system.new_instance(); diff --git a/gui/src/rust/ensogl/example/src/sprite_system_benchmark.rs b/gui/src/rust/ensogl/example/src/sprite_system_benchmark.rs index 52085c8c751..58a664b6688 100644 --- a/gui/src/rust/ensogl/example/src/sprite_system_benchmark.rs +++ b/gui/src/rust/ensogl/example/src/sprite_system_benchmark.rs @@ -24,7 +24,7 @@ pub fn entry_point_sprite_system_benchmark() { let world = World::new(&web::get_html_element_by_id("root").unwrap()); let scene = world.scene(); let camera = scene.camera().clone_ref(); - let navigator = Navigator::new(&scene,&camera); + let navigator = Navigator::new(scene,&camera); let sprite_system = SpriteSystem::new(&world); let sprite1 = sprite_system.new_instance(); diff --git a/gui/src/rust/ensogl/lib/components/src/component.rs b/gui/src/rust/ensogl/lib/components/src/component.rs index f67509b8554..f88328a5bed 100644 --- a/gui/src/rust/ensogl/lib/components/src/component.rs +++ b/gui/src/rust/ensogl/lib/components/src/component.rs @@ -77,7 +77,7 @@ impl> Component { impl display::Object for Component { fn display_object(&self) -> &display::object::Instance { - &self.model.display_object() + self.model.display_object() } } diff --git a/gui/src/rust/ensogl/lib/components/src/drop_down_menu.rs b/gui/src/rust/ensogl/lib/components/src/drop_down_menu.rs index bf5e6a2d4f8..6adc07cb756 100644 --- a/gui/src/rust/ensogl/lib/components/src/drop_down_menu.rs +++ b/gui/src/rust/ensogl/lib/components/src/drop_down_menu.rs @@ -224,7 +224,7 @@ impl DropDownMenu { // === Layouting === - let menu_height = DEPRECATED_Animation::::new(&network); + let menu_height = DEPRECATED_Animation::::new(network); eval menu_height.value ([model](height) { diff --git a/gui/src/rust/ensogl/lib/components/src/list_view.rs b/gui/src/rust/ensogl/lib/components/src/list_view.rs index 64a08964ecd..66fd47c23eb 100644 --- a/gui/src/rust/ensogl/lib/components/src/list_view.rs +++ b/gui/src/rust/ensogl/lib/components/src/list_view.rs @@ -263,9 +263,9 @@ impl ListView { let model = &self.model; let scene = app.display.scene(); let mouse = &scene.mouse.frp; - let view_y = DEPRECATED_Animation::::new(&network); - let selection_y = DEPRECATED_Animation::::new(&network); - let selection_height = DEPRECATED_Animation::::new(&network); + let view_y = DEPRECATED_Animation::::new(network); + let selection_y = DEPRECATED_Animation::::new(network); + let selection_height = DEPRECATED_Animation::::new(network); frp::extend!{ network diff --git a/gui/src/rust/ensogl/lib/components/src/list_view/entry.rs b/gui/src/rust/ensogl/lib/components/src/list_view/entry.rs index a0cffc46310..8c2ecdaed2d 100644 --- a/gui/src/rust/ensogl/lib/components/src/list_view/entry.rs +++ b/gui/src/rust/ensogl/lib/components/src/list_view/entry.rs @@ -446,7 +446,7 @@ impl List { debug!(logger, "Setting new model {model:?} for entry {id}; \ old entry: {entry.id.get():?}."); match model { - Some(model) => entry.set_model(id,&model), + Some(model) => entry.set_model(id,model), None => { error!(logger, "Model provider didn't return model for id {id}."); entry.set_model(id,&default()) diff --git a/gui/src/rust/ensogl/lib/components/src/scroll_area.rs b/gui/src/rust/ensogl/lib/components/src/scroll_area.rs index 114b996486d..1a5e7e68759 100644 --- a/gui/src/rust/ensogl/lib/components/src/scroll_area.rs +++ b/gui/src/rust/ensogl/lib/components/src/scroll_area.rs @@ -91,10 +91,10 @@ impl ScrollArea { let content = display::object::Instance::new(&logger); display_object.add_child(&content); - let h_scrollbar = Scrollbar::new(&app); + let h_scrollbar = Scrollbar::new(app); display_object.add_child(&h_scrollbar); - let v_scrollbar = Scrollbar::new(&app); + let v_scrollbar = Scrollbar::new(app); display_object.add_child(&v_scrollbar); v_scrollbar.set_rotation_z(-90.0_f32.to_radians()); diff --git a/gui/src/rust/ensogl/lib/components/src/selector/shape.rs b/gui/src/rust/ensogl/lib/components/src/selector/shape.rs index 488e95ce91c..b81143644c4 100644 --- a/gui/src/rust/ensogl/lib/components/src/selector/shape.rs +++ b/gui/src/rust/ensogl/lib/components/src/selector/shape.rs @@ -19,6 +19,8 @@ use crate::shadow; struct Background { pub width : Var, pub height : Var, + #[allow(dead_code)] + // This field is not used but should stay as part of the API for future use. pub corner_radius : Var, pub shape : AnyShape, } @@ -129,7 +131,11 @@ pub mod track { /// Struct that contains the shape used to indicate an overflow (a triangle), and some metadata /// that can be used to place and align it. struct OverflowShape { + #[allow(dead_code)] + // This field is not used but should stay as part of the API for future use. pub width : Var, + #[allow(dead_code)] + // This field is not used but should stay as part of the API for future use. pub height : Var, pub shape : AnyShape } diff --git a/gui/src/rust/ensogl/lib/components/src/shadow.rs b/gui/src/rust/ensogl/lib/components/src/shadow.rs index 082f0473c95..278c6b8ad16 100644 --- a/gui/src/rust/ensogl/lib/components/src/shadow.rs +++ b/gui/src/rust/ensogl/lib/components/src/shadow.rs @@ -74,10 +74,10 @@ pub fn from_shape_with_parameters_and_alpha let shadow = shadow.translate((parameters.offset_x.px(),parameters.offset_y.px())); let base_color = Var::::from(parameters.base_color); - let base_color = base_color.multiply_alpha(&alpha); + let base_color = base_color.multiply_alpha(alpha); let fading_color = Var::::from(parameters.fading); - let fading_color = fading_color.multiply_alpha(&alpha); + let fading_color = fading_color.multiply_alpha(alpha); let shadow_color = color::gradient::Linear::> ::new(fading_color.into_linear(),base_color.into_linear()); @@ -95,7 +95,7 @@ pub fn add_to_dom_element(element:&DomSymbol, style:&StyleWatch,logger:&Logger) let blur = style.get_number(ensogl_theme::shadow::html::blur); let spread = style.get_number(ensogl_theme::shadow::html::spread); let shadow = format!("{}px {}px {}px {}px rgba(0,0,0,{})",off_x,off_y,blur,spread,alpha); - element.dom().set_style_or_warn("box-shadow",shadow,&logger); + element.dom().set_style_or_warn("box-shadow",shadow,logger); } diff --git a/gui/src/rust/ensogl/lib/components/src/toggle_button.rs b/gui/src/rust/ensogl/lib/components/src/toggle_button.rs index 2c42e9331ea..d73d552daf4 100644 --- a/gui/src/rust/ensogl/lib/components/src/toggle_button.rs +++ b/gui/src/rust/ensogl/lib/components/src/toggle_button.rs @@ -256,6 +256,6 @@ impl ToggleButton{ impl display::Object for ToggleButton { fn display_object(&self) -> &display::object::Instance { - &self.model.icon.display_object() + self.model.icon.display_object() } } diff --git a/gui/src/rust/ensogl/lib/core/src/animation/easing.rs b/gui/src/rust/ensogl/lib/core/src/animation/easing.rs index 64f8297bf75..ed3239b3dac 100644 --- a/gui/src/rust/ensogl/lib/core/src/animation/easing.rs +++ b/gui/src/rust/ensogl/lib/core/src/animation/easing.rs @@ -234,7 +234,7 @@ where F:AnyFnEasing, OnStep:Callback, OnEnd:Callback { /// Start the animator. pub fn start(&self) { if self.animation_loop.get().is_none() { - let animation_loop = animation::Loop::new(step(&self)); + let animation_loop = animation::Loop::new(step(self)); self.animation_loop.set(Some(animation_loop)); self.data.active.set(true); } diff --git a/gui/src/rust/ensogl/lib/core/src/animation/loops.rs b/gui/src/rust/ensogl/lib/core/src/animation/loops.rs index b24bf4993e0..d1591f6f115 100644 --- a/gui/src/rust/ensogl/lib/core/src/animation/loops.rs +++ b/gui/src/rust/ensogl/lib/core/src/animation/loops.rs @@ -69,7 +69,7 @@ where Callback : RawLoopCallback { let weak_data = Rc::downgrade(&data); let on_frame = move |time| weak_data.upgrade().for_each(|t| t.borrow_mut().run(time)); data.borrow_mut().on_frame = Some(Closure::new(on_frame)); - let handle_id = web::request_animation_frame(&data.borrow_mut().on_frame.as_ref().unwrap()); + let handle_id = web::request_animation_frame(data.borrow_mut().on_frame.as_ref().unwrap()); data.borrow_mut().handle_id = handle_id; Self {data} } diff --git a/gui/src/rust/ensogl/lib/core/src/animation/physics/inertia.rs b/gui/src/rust/ensogl/lib/core/src/animation/physics/inertia.rs index ad0289c8379..354b5241683 100644 --- a/gui/src/rust/ensogl/lib/core/src/animation/physics/inertia.rs +++ b/gui/src/rust/ensogl/lib/core/src/animation/physics/inertia.rs @@ -606,7 +606,7 @@ where T:Value, OnStep:Callback1, OnStart:Callback0, OnEnd:Callback1 , disable_events : Rc> ) -> (physics::inertia::DynSimulator,callback::Handle,NavigatorEvents) { - let simulator = Self::create_simulator(&camera); + let simulator = Self::create_simulator(camera); let panning_callback = enclose!((scene,camera,mut simulator,pan_speed) move |pan: PanEvent| { let fovy_slope = camera.half_fovy_slope(); let distance = camera.position().z; diff --git a/gui/src/rust/ensogl/lib/core/src/display/scene.rs b/gui/src/rust/ensogl/lib/core/src/display/scene.rs index e24b283f2a5..1debd38c24e 100644 --- a/gui/src/rust/ensogl/lib/core/src/display/scene.rs +++ b/gui/src/rust/ensogl/lib/core/src/display/scene.rs @@ -430,7 +430,7 @@ impl Dom { /// Constructor. pub fn new(logger:&Logger) -> Self { let root = web::create_div(); - let layers = DomLayers::new(&logger,&root); + let layers = DomLayers::new(logger,&root); root.set_class_name("scene"); root.set_style_or_panic("height" , "100vh"); root.set_style_or_panic("width" , "100vw"); @@ -478,20 +478,20 @@ impl DomLayers { let front = DomScene::new(logger); let fullscreen_vis = DomScene::new(logger); let back = DomScene::new(logger); - canvas.set_style_or_warn("height" , "100vh" , &logger); - canvas.set_style_or_warn("width" , "100vw" , &logger); - canvas.set_style_or_warn("display" , "block" , &logger); + canvas.set_style_or_warn("height" , "100vh" , logger); + canvas.set_style_or_warn("width" , "100vw" , logger); + canvas.set_style_or_warn("display" , "block" , logger); // Position must not be "static" to have z-index working. - canvas.set_style_or_warn("position" , "absolute", &logger); - canvas.set_style_or_warn("z-index" , "2" , &logger); - canvas.set_style_or_warn("pointer-events", "none" , &logger); + canvas.set_style_or_warn("position" , "absolute", logger); + canvas.set_style_or_warn("z-index" , "2" , logger); + canvas.set_style_or_warn("pointer-events", "none" , logger); front.dom.set_class_name("front"); - front.dom.set_style_or_warn("z-index", "3", &logger); + front.dom.set_style_or_warn("z-index", "3", logger); back.dom.set_class_name("back"); - back.dom.set_style_or_warn("pointer-events", "auto", &logger); - back.dom.set_style_or_warn("z-index" , "0" , &logger); + back.dom.set_style_or_warn("pointer-events", "auto", logger); + back.dom.set_style_or_warn("z-index" , "0" , logger); fullscreen_vis.dom.set_class_name("fullscreen_vis"); - fullscreen_vis.dom.set_style_or_warn("z-index" , "1" , &logger); + fullscreen_vis.dom.set_style_or_warn("z-index" , "1" , logger); dom.append_or_panic(&canvas); dom.append_or_panic(&front.dom); dom.append_or_panic(&back.dom); @@ -779,7 +779,7 @@ impl SceneData { let on_change = enclose!((dirty_flag) move || dirty_flag.set()); let var_logger = Logger::sub(&logger,"global_variables"); let variables = UniformScope::new(var_logger); - let symbols = SymbolRegistry::mk(&variables,&stats,&logger,on_change); + let symbols = SymbolRegistry::mk(&variables,stats,&logger,on_change); // FIXME: This should be abstracted away and should also handle context loss when Symbol // definition will be finally refactored in such way, that it would not require // Scene instance to be created. diff --git a/gui/src/rust/ensogl/lib/core/src/display/scene/dom.rs b/gui/src/rust/ensogl/lib/core/src/display/scene/dom.rs index 99bed6f7684..fa410dd9049 100644 --- a/gui/src/rust/ensogl/lib/core/src/display/scene/dom.rs +++ b/gui/src/rust/ensogl/lib/core/src/display/scene/dom.rs @@ -68,7 +68,7 @@ fn setup_camera_perspective(dom:&web::JsValue, near:f32, matrix:&Matrix4) { // details. unsafe { let matrix_array = matrix.js_buffer_view(); - js::setup_camera_perspective(&dom,&near.into(),&matrix_array) + js::setup_camera_perspective(dom,&near.into(),&matrix_array) } } @@ -79,7 +79,7 @@ fn setup_camera_orthographic(dom:&web::JsValue, matrix:&Matrix4) { // details. unsafe { let matrix_array = matrix.js_buffer_view(); - js::setup_camera_orthographic(&dom,&matrix_array) + js::setup_camera_orthographic(dom,&matrix_array) } } @@ -186,7 +186,7 @@ impl DomScene { let dom = object.dom(); let data = &self.data; if object.is_visible() { - self.view_projection_dom.append_or_panic(&dom); + self.view_projection_dom.append_or_panic(dom); } object.display_object().set_on_hide(f_!(dom.remove())); object.display_object().set_on_show(f__!([data,dom] { diff --git a/gui/src/rust/ensogl/lib/core/src/display/scene/layer.rs b/gui/src/rust/ensogl/lib/core/src/display/scene/layer.rs index b77488ac911..fd325c5fbd2 100644 --- a/gui/src/rust/ensogl/lib/core/src/display/scene/layer.rs +++ b/gui/src/rust/ensogl/lib/core/src/display/scene/layer.rs @@ -467,7 +467,7 @@ impl LayerModel { graph.extend(self.depth_order.borrow().clone().into_iter()); for element in &*self.elements.borrow() { if let LayerElement::ShapeSystem(id) = element { - if let Some(info) = self.shape_system_to_symbol_info_map.borrow().get(&id) { + if let Some(info) = self.shape_system_to_symbol_info_map.borrow().get(id) { for &id2 in &info.below { graph.insert_dependency(*element,id2.into()); } for &id2 in &info.above { graph.insert_dependency(id2.into(),*element); } } diff --git a/gui/src/rust/ensogl/lib/core/src/display/symbol/dom.rs b/gui/src/rust/ensogl/lib/core/src/display/symbol/dom.rs index e4b8adf6ea5..cfaedf506f8 100644 --- a/gui/src/rust/ensogl/lib/core/src/display/symbol/dom.rs +++ b/gui/src/rust/ensogl/lib/core/src/display/symbol/dom.rs @@ -47,7 +47,7 @@ pub fn set_object_transform(dom:&web::JsValue, matrix:&Matrix4) { // details. unsafe { let matrix_array = matrix.js_buffer_view(); - js::set_object_transform(&dom,&matrix_array); + js::set_object_transform(dom,&matrix_array); } } diff --git a/gui/src/rust/ensogl/lib/core/src/display/symbol/gpu.rs b/gui/src/rust/ensogl/lib/core/src/display/symbol/gpu.rs index 50f91a30aca..750832613eb 100644 --- a/gui/src/rust/ensogl/lib/core/src/display/symbol/gpu.rs +++ b/gui/src/rust/ensogl/lib/core/src/display/symbol/gpu.rs @@ -292,8 +292,8 @@ impl Symbol { let shader_dirty = ShaderDirty::new(mat_dirt_logger,Box::new(on_mut)); let surface_on_mut = Box::new(f!(surface_dirty.set())); let shader_on_mut = Box::new(f!(shader_dirty.set())); - let shader = Shader::new(shader_logger,&stats,shader_on_mut); - let surface = Mesh::new(surface_logger,&stats,surface_on_mut); + let shader = Shader::new(shader_logger,stats,shader_on_mut); + let surface = Mesh::new(surface_logger,stats,surface_on_mut); let variables = UniformScope::new(Logger::sub(&logger,"uniform_scope")); let global_variables = global_variables.clone_ref(); let bindings = default(); @@ -540,10 +540,10 @@ impl Symbol { /// is executed, both program and VAO are bound to None. fn with_program(&self, context:&Context, f:F) { if let Some(program) = self.shader.program().as_ref() { - context.use_program(Some(&program)); + context.use_program(Some(program)); let bindings = self.bindings.borrow(); if let Some(vao) = bindings.vao.as_ref() { - vao.with(|| { f(&program) }); + vao.with(|| { f(program) }); } context.use_program(None); } diff --git a/gui/src/rust/ensogl/lib/core/src/display/world.rs b/gui/src/rust/ensogl/lib/core/src/display/world.rs index bc3c251e9ac..649d5704269 100644 --- a/gui/src/rust/ensogl/lib/core/src/display/world.rs +++ b/gui/src/rust/ensogl/lib/core/src/display/world.rs @@ -137,7 +137,7 @@ impl World { // TODO: We may want to enable it on weak hardware. // pixel_read_pass.set_threshold(1); let pipeline = RenderPipeline::new() - .add(SymbolsRenderPass::new(&self.scene.symbols(),&self.scene.layers)) + .add(SymbolsRenderPass::new(self.scene.symbols(),&self.scene.layers)) .add(ScreenRenderPass::new(self)) .add(pixel_read_pass); self.scene.renderer.set_pipeline(pipeline); diff --git a/gui/src/rust/ensogl/lib/core/src/gui/cursor.rs b/gui/src/rust/ensogl/lib/core/src/gui/cursor.rs index f61f005ea23..e550601fd52 100644 --- a/gui/src/rust/ensogl/lib/core/src/gui/cursor.rs +++ b/gui/src/rust/ensogl/lib/core/src/gui/cursor.rs @@ -261,17 +261,17 @@ impl Cursor { // host during the movement. After it is fully attached, cursor moves with the same // speed as the scene when panning. // - let press = Animation :: :: new(&network); - let radius = DEPRECATED_Animation :: :: new(&network); - let size = DEPRECATED_Animation :: :: new(&network); - let offset = DEPRECATED_Animation :: :: new(&network); - let color_lab = DEPRECATED_Animation :: :: new(&network); - let color_alpha = DEPRECATED_Animation :: :: new(&network); - let inactive_fade = DEPRECATED_Animation :: :: new(&network); - let host_position = DEPRECATED_Animation :: :: new(&network); - let host_follow_weight = DEPRECATED_Animation :: :: new(&network); - let host_attached_weight = DEPRECATED_Tween :: new(&network); - let port_selection_layer_weight = Animation :: :: new(&network); + let press = Animation :: :: new(network); + let radius = DEPRECATED_Animation :: :: new(network); + let size = DEPRECATED_Animation :: :: new(network); + let offset = DEPRECATED_Animation :: :: new(network); + let color_lab = DEPRECATED_Animation :: :: new(network); + let color_alpha = DEPRECATED_Animation :: :: new(network); + let inactive_fade = DEPRECATED_Animation :: :: new(network); + let host_position = DEPRECATED_Animation :: :: new(network); + let host_follow_weight = DEPRECATED_Animation :: :: new(network); + let host_attached_weight = DEPRECATED_Tween :: new(network); + let port_selection_layer_weight = Animation :: :: new(network); host_attached_weight.set_duration(300.0); color_lab.set_target_value(DEFAULT_COLOR.opaque.into()); diff --git a/gui/src/rust/ensogl/lib/core/src/lib.rs b/gui/src/rust/ensogl/lib/core/src/lib.rs index 82731b54bae..9baaa9fa104 100644 --- a/gui/src/rust/ensogl/lib/core/src/lib.rs +++ b/gui/src/rust/ensogl/lib/core/src/lib.rs @@ -13,7 +13,6 @@ #![feature(fn_traits)] #![feature(specialization)] #![feature(trait_alias)] -#![feature(try_trait)] #![feature(marker_trait_attr)] #![feature(min_type_alias_impl_trait)] #![feature(unboxed_closures)] diff --git a/gui/src/rust/ensogl/lib/core/src/system/gpu/data/texture/storage/gpu_only.rs b/gui/src/rust/ensogl/lib/core/src/system/gpu/data/texture/storage/gpu_only.rs index 561c46c4663..75ac7d9eeed 100644 --- a/gui/src/rust/ensogl/lib/core/src/system/gpu/data/texture/storage/gpu_only.rs +++ b/gui/src/rust/ensogl/lib/core/src/system/gpu/data/texture/storage/gpu_only.rs @@ -58,7 +58,7 @@ TextureReload for Texture { let format = Self::gl_format().into(); let elem_type = Self::gl_elem_type(); - self.context().bind_texture(target,Some(&self.gl_texture())); + self.context().bind_texture(target,Some(self.gl_texture())); self.context().tex_image_2d_with_i32_and_i32_and_i32_and_format_and_type_and_opt_u8_array (target,level,internal_format,width,height,border,format,elem_type,None).unwrap(); diff --git a/gui/src/rust/ensogl/lib/core/src/system/gpu/data/texture/storage/remote_image.rs b/gui/src/rust/ensogl/lib/core/src/system/gpu/data/texture/storage/remote_image.rs index 3e49c269c79..c88ded2cf56 100644 --- a/gui/src/rust/ensogl/lib/core/src/system/gpu/data/texture/storage/remote_image.rs +++ b/gui/src/rust/ensogl/lib/core/src/system/gpu/data/texture/storage/remote_image.rs @@ -62,7 +62,7 @@ Texture { let height = 1; let border = 0; let color = vec![0,0,255,255]; - self.context().bind_texture(Context::TEXTURE_2D,Some(&self.gl_texture())); + self.context().bind_texture(Context::TEXTURE_2D,Some(self.gl_texture())); self.context().tex_image_2d_with_i32_and_i32_and_i32_and_format_and_type_and_opt_u8_array (target,level,internal_format,width,height,border,format,elem_type,Some(&color)).unwrap(); } diff --git a/gui/src/rust/ensogl/lib/core/src/system/gpu/shader.rs b/gui/src/rust/ensogl/lib/core/src/system/gpu/shader.rs index 2c7842b6a48..d368ee7b8fe 100644 --- a/gui/src/rust/ensogl/lib/core/src/system/gpu/shader.rs +++ b/gui/src/rust/ensogl/lib/core/src/system/gpu/shader.rs @@ -72,21 +72,21 @@ pub trait CompilationTarget { impl CompilationTarget for Shader { fn check(&self, ctx: &Context) -> bool { - ctx.get_shader_parameter(&self, Context::COMPILE_STATUS).as_bool().unwrap_or(false) + ctx.get_shader_parameter(self, Context::COMPILE_STATUS).as_bool().unwrap_or(false) } fn logs(&self, ctx: &Context) -> String { - unwrap_error(ctx.get_shader_info_log(&self)) + unwrap_error(ctx.get_shader_info_log(self)) } } impl CompilationTarget for Program { fn check(&self, ctx: &Context) -> bool { - ctx.get_program_parameter(&self, Context::LINK_STATUS).as_bool().unwrap_or(false) + ctx.get_program_parameter(self, Context::LINK_STATUS).as_bool().unwrap_or(false) } fn logs(&self, ctx: &Context) -> String { - unwrap_error(ctx.get_program_info_log(&self)) + unwrap_error(ctx.get_program_info_log(self)) } } @@ -160,7 +160,7 @@ pub fn link_program(ctx:&Context, vert_shader:&Shader, frag_shader:&Shader) -> R /// Set the array buffer data with floats. pub fn set_buffer_data(gl_context:&Context, buffer:&WebGlBuffer, data:&[f32]) { let target = Context::ARRAY_BUFFER; - gl_context.bind_buffer(target,Some(&buffer)); + gl_context.bind_buffer(target,Some(buffer)); set_bound_buffer_data(gl_context,target,data); } @@ -175,7 +175,7 @@ pub fn set_buffer_data(gl_context:&Context, buffer:&WebGlBuffer, data:&[f32]) { fn set_bound_buffer_data(gl_context:&Context, target:u32, data:&[f32]) { let usage = Context::STATIC_DRAW; unsafe { - let float_array = Float32Array::view(&data); + let float_array = Float32Array::view(data); gl_context.buffer_data_with_array_buffer_view(target,&float_array,usage); } } @@ -183,7 +183,7 @@ fn set_bound_buffer_data(gl_context:&Context, target:u32, data:&[f32]) { /// Set the array buffer fragment with with floats. pub fn set_buffer_subdata(gl_context:&Context, buffer:&WebGlBuffer, offset:usize, data:&[f32]) { let target = Context::ARRAY_BUFFER; - gl_context.bind_buffer(target,Some(&buffer)); + gl_context.bind_buffer(target,Some(buffer)); set_bound_buffer_subdata(gl_context,target,offset as i32,data); } @@ -197,7 +197,7 @@ pub fn set_buffer_subdata(gl_context:&Context, buffer:&WebGlBuffer, offset:usize #[allow(unsafe_code)] fn set_bound_buffer_subdata(gl_context:&Context, target:u32, offset:i32, data:&[f32]) { unsafe { - let float_array = Float32Array::view(&data); + let float_array = Float32Array::view(data); gl_context.buffer_sub_data_with_i32_and_array_buffer_view(target,offset,&float_array); } } diff --git a/gui/src/rust/ensogl/lib/text/embedded-fonts/build.rs b/gui/src/rust/ensogl/lib/text/embedded-fonts/build.rs index c850e8d0f10..d741b34d466 100644 --- a/gui/src/rust/ensogl/lib/text/embedded-fonts/build.rs +++ b/gui/src/rust/ensogl/lib/text/embedded-fonts/build.rs @@ -92,7 +92,7 @@ mod deja_vu { pub fn download_and_extract_all_fonts(out_dir : &path::Path) { let package_path = out_dir.join(PACKAGE.filename); - PACKAGE.download(&out_dir); + PACKAGE.download(out_dir); extract_all_fonts(package_path.as_path()); } diff --git a/gui/src/rust/ensogl/lib/text/src/component/area.rs b/gui/src/rust/ensogl/lib/text/src/component/area.rs index 85feb1854b8..22d8d323bd9 100644 --- a/gui/src/rust/ensogl/lib/text/src/component/area.rs +++ b/gui/src/rust/ensogl/lib/text/src/component/area.rs @@ -306,7 +306,7 @@ impl Area { let mouse = &scene.mouse.frp; let input = &self.frp.input; let out = &self.frp.output; - let pos = DEPRECATED_Animation :: :: new(&network); + let pos = DEPRECATED_Animation :: :: new(network); let keyboard = &scene.keyboard; let m = &model; pos.update_spring(|spring| spring*2.0); diff --git a/gui/src/rust/ide/lib/ast/impl/src/crumbs.rs b/gui/src/rust/ide/lib/ast/impl/src/crumbs.rs index f95c5726f0b..6ce7d9cb909 100644 --- a/gui/src/rust/ide/lib/ast/impl/src/crumbs.rs +++ b/gui/src/rust/ide/lib/ast/impl/src/crumbs.rs @@ -1026,7 +1026,7 @@ impl Crumbable for crate::Match { fn iter_subcrumbs<'a>(&'a self) -> Box + 'a> { let mut crumbs = vec![]; if let Some(pat) = &self.pfx { - for crumb in pattern_subcrumbs(&pat) { + for crumb in pattern_subcrumbs(pat) { crumbs.push(MatchCrumb::Pfx{val:crumb}); } } @@ -1051,7 +1051,7 @@ impl Crumbable for crate::Ambiguous { AmbiguousSegmentCrumb::Body => &seg.body.as_ref().ok_or_else(|| NotPresent("body".into()))?.wrapped, }; - Ok(&ast) + Ok(ast) } fn set(&self, crumb:&Self::Crumb, new_ast:Ast) -> FallibleResult { diff --git a/gui/src/rust/ide/lib/ast/impl/src/lib.rs b/gui/src/rust/ide/lib/ast/impl/src/lib.rs index b6bb6d7ce68..9f23466dd1a 100644 --- a/gui/src/rust/ide/lib/ast/impl/src/lib.rs +++ b/gui/src/rust/ide/lib/ast/impl/src/lib.rs @@ -314,7 +314,7 @@ impl Ast { /// Returned index is the position of the first character of child's text representation within /// the text representation of this AST node. pub fn child_offset(&self, child:&Ast) -> FallibleResult { - let searched_token = Token::Ast(&child); + let searched_token = Token::Ast(child); let mut found_child = false; let mut position = 0; self.shape().feed_to(&mut |token:Token| { diff --git a/gui/src/rust/ide/lib/ast/impl/src/macros.rs b/gui/src/rust/ide/lib/ast/impl/src/macros.rs index 7f30cc65ce5..7d80dc97a81 100644 --- a/gui/src/rust/ide/lib/ast/impl/src/macros.rs +++ b/gui/src/rust/ide/lib/ast/impl/src/macros.rs @@ -83,7 +83,7 @@ pub fn as_lambda(ast:&Ast) -> Option { let arg = ast.get_located(child_iter.next()?).ok()?; let opr = ast.get_located(child_iter.next()?).ok()?; let body = ast.get_located(child_iter.next()?).ok()?; - let is_arrow = crate::opr::is_arrow_opr(&opr.item); + let is_arrow = crate::opr::is_arrow_opr(opr.item); is_arrow.then_some(LambdaInfo {arg,opr,body}) } diff --git a/gui/src/rust/ide/lib/ast/impl/src/opr.rs b/gui/src/rust/ide/lib/ast/impl/src/opr.rs index 61ac92b4932..25c1e134e11 100644 --- a/gui/src/rust/ide/lib/ast/impl/src/opr.rs +++ b/gui/src/rust/ide/lib/ast/impl/src/opr.rs @@ -346,12 +346,12 @@ impl Chain { /// If this is infix, it flattens whole chain and returns result. /// Otherwise, returns None. pub fn try_new(ast:&Ast) -> Option { - GeneralizedInfix::try_new(&ast).map(|infix| infix.flatten()) + GeneralizedInfix::try_new(ast).map(|infix| infix.flatten()) } /// Flattens infix chain if this is infix application of given operator. pub fn try_new_of(ast:&Ast, operator:&str) -> Option { - let infix = GeneralizedInfix::try_new(&ast)?; + let infix = GeneralizedInfix::try_new(ast)?; (infix.name() == operator).as_some_from(|| infix.flatten()) } diff --git a/gui/src/rust/ide/lib/ast/macros/src/lib.rs b/gui/src/rust/ide/lib/ast/macros/src/lib.rs index 1fa8caa5ed3..ad280d83b5c 100644 --- a/gui/src/rust/ide/lib/ast/macros/src/lib.rs +++ b/gui/src/rust/ide/lib/ast/macros/src/lib.rs @@ -237,7 +237,7 @@ pub fn to_variant_types let variant_decls = variant_idents.iter().zip(structs.iter()) .map(|(i,v)| gen_variant_decl(i,v)); let variant_froms = variant_idents.iter().zip(structs.iter()) - .map(|(i,v)| gen_from_impls(i, &decl, &v)); + .map(|(i,v)| gen_from_impls(i, &decl, v)); // Handle single value, unnamed params as created by user. let structs = structs.iter().filter(|v| match &v.fields { @@ -267,7 +267,7 @@ pub fn derive_has_tokens (input:proc_macro::TokenStream) -> proc_macro::TokenStream { let decl = syn::parse_macro_input!(input as syn::DeriveInput); let ret = match decl.data { - syn::Data::Enum(ref e) => token::derive_for_enum(&decl, &e), + syn::Data::Enum(ref e) => token::derive_for_enum(&decl, e), _ => quote! {}, }; proc_macro::TokenStream::from(ret) diff --git a/gui/src/rust/ide/lib/enso-protocol/src/binary/serialization.rs b/gui/src/rust/ide/lib/enso-protocol/src/binary/serialization.rs index 447aad8a2a4..564f3595762 100644 --- a/gui/src/rust/ide/lib/enso-protocol/src/binary/serialization.rs +++ b/gui/src/rust/ide/lib/enso-protocol/src/binary/serialization.rs @@ -308,7 +308,7 @@ impl SerializableUnion for FromServerPayloadOwned { Success::create(builder, &SuccessArgs {}).as_union_value() } FromServerPayloadOwned::Error {code,message,data} => { - let message = builder.create_string(&message); + let message = builder.create_string(message); let data_serialized = data.serialize(builder); Error::create(builder, &ErrorArgs { code : *code, @@ -318,13 +318,13 @@ impl SerializableUnion for FromServerPayloadOwned { }).as_union_value() } FromServerPayloadOwned::FileContentsReply {contents} => { - let contents = builder.create_vector(&contents); + let contents = builder.create_vector(contents); FileContentsReply::create(builder, &FileContentsReplyArgs { contents : Some(contents) }).as_union_value() } FromServerPayloadOwned::VisualizationUpdate {data,context} => { - let data = builder.create_vector(&data); + let data = builder.create_vector(data); let context = context.serialize(builder); VisualisationUpdate::create(builder, &VisualisationUpdateArgs { data : Some(data), diff --git a/gui/src/rust/ide/lib/json-rpc/src/messages.rs b/gui/src/rust/ide/lib/json-rpc/src/messages.rs index 92ac668ae38..1780b402ad8 100644 --- a/gui/src/rust/ide/lib/json-rpc/src/messages.rs +++ b/gui/src/rust/ide/lib/json-rpc/src/messages.rs @@ -216,7 +216,7 @@ pub fn decode_incoming_message use serde_json::Value; use serde_json::from_str; use serde_json::from_value; - let message = from_str::>(&message)?; + let message = from_str::>(message)?; from_value::(message.payload) } diff --git a/gui/src/rust/ide/lib/parser/src/api.rs b/gui/src/rust/ide/lib/parser/src/api.rs index 1da50e007aa..83d46795060 100644 --- a/gui/src/rust/ide/lib/parser/src/api.rs +++ b/gui/src/rust/ide/lib/parser/src/api.rs @@ -112,13 +112,13 @@ impl SourceFile { } /// Get fragment of serialized string with code. - pub fn code_slice(&self) -> &str { &self.slice(&self.code) } + pub fn code_slice(&self) -> &str { self.slice(&self.code) } /// Get fragment of serialized string with id map. - pub fn id_map_slice (&self) -> &str { &self.slice(&self.id_map) } + pub fn id_map_slice (&self) -> &str { self.slice(&self.id_map) } /// Get fragment of serialized string with metadata. - pub fn metadata_slice(&self) -> &str { &self.slice(&self.metadata) } + pub fn metadata_slice(&self) -> &str { self.slice(&self.metadata) } fn slice(&self, range:&Range) -> &str { &self.content[range.start.value..range.end.value] diff --git a/gui/src/rust/ide/lib/parser/src/lib.rs b/gui/src/rust/ide/lib/parser/src/lib.rs index 5382a94d39b..5e7186a0ed2 100644 --- a/gui/src/rust/ide/lib/parser/src/lib.rs +++ b/gui/src/rust/ide/lib/parser/src/lib.rs @@ -130,7 +130,7 @@ impl Parser { /// deeply nested ASTs. pub fn from_json_str_without_recursion_limit<'de, Value:serde::Deserialize<'de>>(json_text:&'de str) -> Result { - let mut de = serde_json::Deserializer::from_str(&json_text); + let mut de = serde_json::Deserializer::from_str(json_text); de.disable_recursion_limit(); Value::deserialize(&mut de) } diff --git a/gui/src/rust/ide/lib/parser/src/wsclient.rs b/gui/src/rust/ide/lib/parser/src/wsclient.rs index 429baf34a41..8ddaacd9727 100644 --- a/gui/src/rust/ide/lib/parser/src/wsclient.rs +++ b/gui/src/rust/ide/lib/parser/src/wsclient.rs @@ -39,6 +39,7 @@ pub const PORT_VAR: &str = "ENSO_PARSER_PORT"; pub type Result = std::result::Result; +#[allow(clippy::enum_variant_names)] #[derive(Debug, Fail)] pub enum Error { #[fail(display = "Failed to parse given address url: {}", _0)] @@ -88,6 +89,7 @@ impl From for Error { // ============== /// All request supported by the Parser Service. +#[allow(clippy::enum_variant_names)] #[derive(Debug, serde::Serialize, serde::Deserialize)] pub enum Request { ParseRequest { program : String, ids : IdMap }, diff --git a/gui/src/rust/ide/lib/span-tree/src/action.rs b/gui/src/rust/ide/lib/span-tree/src/action.rs index 19f3cf0b41e..73da9c6dd6d 100644 --- a/gui/src/rust/ide/lib/span-tree/src/action.rs +++ b/gui/src/rust/ide/lib/span-tree/src/action.rs @@ -115,7 +115,7 @@ impl<'a,T> Implementation for node::Ref<'a,T> { let kind = &ins_point.kind; let ast = root.get_traversing(&self.ast_crumbs)?; let expect_arg = matches!(kind, ExpectedArgument(_)); - let extended_infix = (!expect_arg).and_option_from(|| ast::opr::Chain::try_new(&ast)); + let extended_infix = (!expect_arg).and_option_from(|| ast::opr::Chain::try_new(ast)); let new_ast = modify_preserving_id(ast, |ast| if let Some(mut infix) = extended_infix { let item = ArgWithOffset {arg:new, offset:DEFAULT_OFFSET}; diff --git a/gui/src/rust/ide/lib/span-tree/src/generate.rs b/gui/src/rust/ide/lib/span-tree/src/generate.rs index 3c426eedaf8..c1e633dde62 100644 --- a/gui/src/rust/ide/lib/span-tree/src/generate.rs +++ b/gui/src/rust/ide/lib/span-tree/src/generate.rs @@ -376,7 +376,7 @@ fn generate_node_for_known_match let children_kind = node::Kind::argument().with_removable(removable); let mut gen = ChildGenerator::default(); if let Some(pat) = &this.pfx { - for macros::AstInPattern {ast,crumbs} in macros::all_ast_nodes_in_pattern(&pat) { + for macros::AstInPattern {ast,crumbs} in macros::all_ast_nodes_in_pattern(pat) { let ast_crumb = ast::crumbs::MatchCrumb::Pfx {val:crumbs}; let located_ast = Located::new(ast_crumb,ast.wrapped); gen.generate_ast_node(located_ast,children_kind.clone(),context)?; diff --git a/gui/src/rust/ide/lib/span-tree/src/generate/macros.rs b/gui/src/rust/ide/lib/span-tree/src/generate/macros.rs index 28d9a64011a..82636f1561b 100644 --- a/gui/src/rust/ide/lib/span-tree/src/generate/macros.rs +++ b/gui/src/rust/ide/lib/span-tree/src/generate/macros.rs @@ -64,18 +64,18 @@ impl<'a> PatternDfs<'a> { fn push_children_to_visit(&mut self, pattern:&LocatedPattern<'a>) { use ast::MacroPatternMatchRaw::*; match pattern.pattern.deref() { - Except(pat) => self.push_child_to_visit(&pattern,&pat.elem,PatternMatchCrumb::Except), - Tag(pat) => self.push_child_to_visit(&pattern,&pat.elem,PatternMatchCrumb::Tag), - Cls(pat) => self.push_child_to_visit(&pattern,&pat.elem,PatternMatchCrumb::Cls), - Or(pat) => self.push_child_to_visit(&pattern,&pat.elem,PatternMatchCrumb::Or), + Except(pat) => self.push_child_to_visit(pattern,&pat.elem,PatternMatchCrumb::Except), + Tag(pat) => self.push_child_to_visit(pattern,&pat.elem,PatternMatchCrumb::Tag), + Cls(pat) => self.push_child_to_visit(pattern,&pat.elem,PatternMatchCrumb::Cls), + Or(pat) => self.push_child_to_visit(pattern,&pat.elem,PatternMatchCrumb::Or), Seq(pat) => { let (left_elem,right_elem) = &pat.elem; - self.push_child_to_visit(&pattern,right_elem,PatternMatchCrumb::Seq{right:true}); - self.push_child_to_visit(&pattern,left_elem ,PatternMatchCrumb::Seq{right:false}); + self.push_child_to_visit(pattern,right_elem,PatternMatchCrumb::Seq{right:true}); + self.push_child_to_visit(pattern,left_elem ,PatternMatchCrumb::Seq{right:false}); }, Many(pat) => { for (index,elem) in pat.elem.iter().enumerate().rev() { - self.push_child_to_visit(&pattern,elem,PatternMatchCrumb::Many {index}); + self.push_child_to_visit(pattern,elem,PatternMatchCrumb::Many {index}); } } // Other patterns does not have children. diff --git a/gui/src/rust/ide/lib/span-tree/src/iter.rs b/gui/src/rust/ide/lib/span-tree/src/iter.rs index d1ac9f92192..c471d8ca367 100644 --- a/gui/src/rust/ide/lib/span-tree/src/iter.rs +++ b/gui/src/rust/ide/lib/span-tree/src/iter.rs @@ -56,7 +56,7 @@ impl<'a,T:Payload> Iterator for LeafIterator<'a,T> { impl<'a,T> LeafIterator<'a,T> { /// Create iterator iterating over leafs of subtree rooted on `node`. pub fn new(node: node::Ref<'a,T>, fragment:TreeFragment) -> Self { - let stack = vec![StackFrame {node:&node.node, child_being_visited:0}]; + let stack = vec![StackFrame {node:node.node, child_being_visited:0}]; let next_node = node.node.children.first().map(|ch| &ch.node); let base_node = node; let mut this = Self {stack,next_node,base_node,fragment}; @@ -81,8 +81,8 @@ impl<'a,T> LeafIterator<'a,T> { fn descend_to_leaf(&mut self) { if let Some(mut current) = std::mem::take(&mut self.next_node) { - while self.can_descend(¤t) && !current.children.is_empty() { - self.stack.push(StackFrame { node: ¤t, child_being_visited: 0 }); + while self.can_descend(current) && !current.children.is_empty() { + self.stack.push(StackFrame { node: current, child_being_visited: 0 }); current = ¤t.children.first().unwrap().node; } self.next_node = Some(current); diff --git a/gui/src/rust/ide/lib/span-tree/src/node.rs b/gui/src/rust/ide/lib/span-tree/src/node.rs index 23b49f89de6..b7af1a6dede 100644 --- a/gui/src/rust/ide/lib/span-tree/src/node.rs +++ b/gui/src/rust/ide/lib/span-tree/src/node.rs @@ -502,7 +502,7 @@ impl<'a,T:Payload> Ref<'a,T> { Some(self) } else { self.children_iter().find_map(|ch| - ch.span().contains_span(span).and_option_from(|| ch.find_by_span(&span)) + ch.span().contains_span(span).and_option_from(|| ch.find_by_span(span)) ) } } @@ -511,7 +511,7 @@ impl<'a,T:Payload> Ref<'a,T> { impl<'a,T> Deref for Ref<'a,T> { type Target = Node; fn deref(&self) -> &Self::Target { - &self.node + self.node } } @@ -671,7 +671,7 @@ impl<'a,T:Payload> RefMut<'a,T> { impl<'a,T> Deref for RefMut<'a,T> { type Target = Node; fn deref(&self) -> &Self::Target { - &self.node + self.node } } diff --git a/gui/src/rust/ide/src/controller/searcher.rs b/gui/src/rust/ide/src/controller/searcher.rs index 790e14b711c..bc3038400b7 100644 --- a/gui/src/rust/ide/src/controller/searcher.rs +++ b/gui/src/rust/ide/src/controller/searcher.rs @@ -220,7 +220,7 @@ impl ParsedInput { } fn new_from_ast(ast:&Ast) -> Self { - let prefix = ast::prefix::Chain::from_ast_non_strict(&ast); + let prefix = ast::prefix::Chain::from_ast_non_strict(ast); ParsedInput { expression : Some(ast::Shifted::new(default(),prefix)), pattern_offset : 0, @@ -335,7 +335,7 @@ impl ThisNode { // form. If we wanted to support pattern subparts, the engine would need to send us // value updates for matched pattern pieces. See the issue: // https://github.com/enso-org/enso/issues/1038 - (ast::identifier::as_var(&ast)?.to_owned(),false) + (ast::identifier::as_var(ast)?.to_owned(),false) } else { (graph.variable_name_for(&node.info).ok()?.repr(),true) }; @@ -392,7 +392,7 @@ impl FragmentAddedByPickingSuggestion { fn code_to_insert(&self, current_module:&QualifiedName, this_node:&Option) -> CodeToInsert { let generate_this = self.id != CompletedFragmentId::Function || this_node.is_none(); - self.picked_suggestion.code_to_insert(Some(¤t_module),generate_this) + self.picked_suggestion.code_to_insert(Some(current_module),generate_this) } } @@ -542,7 +542,7 @@ impl Searcher { /// in a new action list (the appropriate notification will be emitted). pub fn set_input(&self, new_input:String) -> FallibleResult { debug!(self.logger, "Manually setting input to {new_input}."); - let parsed_input = ParsedInput::new(new_input,&self.ide.parser())?; + let parsed_input = ParsedInput::new(new_input,self.ide.parser())?; let old_expr = self.data.borrow().input.expression.repr(); let new_expr = parsed_input.expression.repr(); diff --git a/gui/src/rust/ide/src/controller/text.rs b/gui/src/rust/ide/src/controller/text.rs index 5498d41af0a..625192fdd9d 100644 --- a/gui/src/rust/ide/src/controller/text.rs +++ b/gui/src/rust/ide/src/controller/text.rs @@ -84,7 +84,7 @@ impl Handle { use FileHandle::*; match &self.file { PlainText {path,language_server} => { - let response = language_server.read_file(&path).await; + let response = language_server.read_file(path).await; response.map(|response| response.contents) }, Module{controller} => Ok(controller.code()) diff --git a/gui/src/rust/ide/src/controller/visualization.rs b/gui/src/rust/ide/src/controller/visualization.rs index 57550acbc85..029a579a77e 100644 --- a/gui/src/rust/ide/src/controller/visualization.rs +++ b/gui/src/rust/ide/src/controller/visualization.rs @@ -150,7 +150,7 @@ impl Handle { }, VisualizationPath::File(path) => { let project = visualization::path::Project::CurrentProject; - let js_code = self.language_server_rpc.read_file(&path).await?.contents; + let js_code = self.language_server_rpc.read_file(path).await?.contents; let wrap_error = |err| { Error::js_preparation_error(visualization.clone(),err).into() }; diff --git a/gui/src/rust/ide/src/double_representation/alias_analysis.rs b/gui/src/rust/ide/src/double_representation/alias_analysis.rs index d35cfa27ba5..ef42990d099 100644 --- a/gui/src/rust/ide/src/double_representation/alias_analysis.rs +++ b/gui/src/rust/ide/src/double_representation/alias_analysis.rs @@ -196,7 +196,7 @@ impl AliasAnalyzer { /// Processes the given AST, while crumb is temporarily pushed to the current location. fn process_located_ast(&mut self, located_ast:&Located>) { - self.in_location_of(&located_ast, |this| this.process_ast(located_ast.item.borrow())) + self.in_location_of(located_ast, |this| this.process_ast(located_ast.item.borrow())) } /// Processes subtrees of the given AST denoted by given crumbs @@ -223,7 +223,7 @@ impl AliasAnalyzer { /// /// This is the primary function that is recursively being called as the AST is being traversed. pub fn process_ast(&mut self, ast:&Ast) { - if let Some(definition) = DefinitionInfo::from_line_ast(&ast,ScopeKind::NonRoot,default()) { + if let Some(definition) = DefinitionInfo::from_line_ast(ast,ScopeKind::NonRoot,default()) { self.process_definition(&definition) } else if let Some(assignment) = ast::opr::to_assignment(ast) { self.process_assignment(&assignment); diff --git a/gui/src/rust/ide/src/double_representation/connection.rs b/gui/src/rust/ide/src/double_representation/connection.rs index 00288c72f2b..2257d219445 100644 --- a/gui/src/rust/ide/src/double_representation/connection.rs +++ b/gui/src/rust/ide/src/double_representation/connection.rs @@ -40,9 +40,9 @@ impl Endpoint { _ => None, }?; let line_ast = block.get(&line_crumb).ok()?; - let definition = DefinitionInfo::from_line_ast(&line_ast,ScopeKind::NonRoot,block.indent); + let definition = DefinitionInfo::from_line_ast(line_ast,ScopeKind::NonRoot,block.indent); let is_non_def = definition.is_none(); - let node = is_non_def.and_option_from(|| NodeInfo::from_line_ast(&line_ast))?.id(); + let node = is_non_def.and_option_from(|| NodeInfo::from_line_ast(line_ast))?.id(); Some(Endpoint { node, crumbs }) } } diff --git a/gui/src/rust/ide/src/double_representation/module.rs b/gui/src/rust/ide/src/double_representation/module.rs index af63d0a95b0..0b968d76108 100644 --- a/gui/src/rust/ide/src/double_representation/module.rs +++ b/gui/src/rust/ide/src/double_representation/module.rs @@ -175,8 +175,8 @@ impl QualifiedName { let text = text.as_ref(); let segments = text.split(ACCESS); - if let [ref project_name,ref id_segments @ ..] = *segments.collect_vec().as_slice() { - let project_name = ReferentName::new(*project_name)?; + if let [project_name,ref id_segments @ ..] = *segments.collect_vec().as_slice() { + let project_name = ReferentName::new(project_name)?; let id = Id::try_new(id_segments)?; Ok(Self::new(project_name,id)) } else { @@ -489,7 +489,7 @@ impl Info { pub fn add_module_import (&mut self, here:&QualifiedName, parser:&parser::Parser, to_add:&QualifiedName) { let is_here = to_add == here; - let import = ImportInfo::from_qualified_name(&to_add); + let import = ImportInfo::from_qualified_name(to_add); let already_imported = self.iter_imports().any(|imp| imp == import); if !is_here && !already_imported { self.add_import(parser,import); @@ -658,7 +658,7 @@ pub fn locate_line_with pub fn locate_child (ast:&known::Module, crumb:&definition::Crumb) -> FallibleResult { - let child = ast.def_iter().find_by_name(&crumb)?; + let child = ast.def_iter().find_by_name(crumb)?; Ok(ChildDefinition::try_from(child)?) } @@ -669,7 +669,7 @@ pub fn locate // Not exactly regular - we need special case for the first crumb as it is not a definition nor // a children. After this we can go just from one definition to another. let first_crumb = crumbs_iter.next().ok_or(EmptyDefinitionId)?; - let mut child = ast.def_iter().find_by_name(&first_crumb)?; + let mut child = ast.def_iter().find_by_name(first_crumb)?; for crumb in crumbs_iter { child = definition::resolve_single_name(child,crumb)?; } diff --git a/gui/src/rust/ide/src/double_representation/node.rs b/gui/src/rust/ide/src/double_representation/node.rs index 31dc1e574ce..1c562e7a6fe 100644 --- a/gui/src/rust/ide/src/double_representation/node.rs +++ b/gui/src/rust/ide/src/double_representation/node.rs @@ -34,7 +34,7 @@ pub fn is_node_by_id(line:&ast::BlockLine>, id:ast::Id) -> bool { /// Searches for `NodeInfo` with the associated `id` index in `lines`. Returns an error if /// the Id is not found. pub fn index_in_lines(lines:&[ast::BlockLine>], id:ast::Id) -> FallibleResult { - let position = lines.iter().position(|line| is_node_by_id(&line,id)); + let position = lines.iter().position(|line| is_node_by_id(line,id)); position.ok_or_else(|| IdNotFound{id}.into()) } @@ -109,7 +109,7 @@ impl NodeInfo { pub fn expression(&self) -> &Ast { match self { NodeInfo::Binding {infix} => &infix.rarg, - NodeInfo::Expression{ast} => &ast, + NodeInfo::Expression{ast} => ast, } } diff --git a/gui/src/rust/ide/src/double_representation/refactorings/collapse.rs b/gui/src/rust/ide/src/double_representation/refactorings/collapse.rs index afe481106d5..47494a7e7f4 100644 --- a/gui/src/rust/ide/src/double_representation/refactorings/collapse.rs +++ b/gui/src/rust/ide/src/double_representation/refactorings/collapse.rs @@ -342,7 +342,7 @@ impl Collapser { if !self.extracted.is_selected(node_id) { Ok(LineDisposition::Keep) } else if node_id == self.replaced_node { - let expression = self.call_to_extracted(&extracted_definition)?; + let expression = self.call_to_extracted(extracted_definition)?; let no_node_err = failure::Error::from(CannotConstructCollapsedNode); let mut new_node = NodeInfo::new_expression(expression.clone_ref()).ok_or(no_node_err)?; new_node.set_id(self.collapsed_node); diff --git a/gui/src/rust/ide/src/double_representation/text.rs b/gui/src/rust/ide/src/double_representation/text.rs index 561f81479a2..9b27c45be87 100644 --- a/gui/src/rust/ide/src/double_representation/text.rs +++ b/gui/src/rust/ide/src/double_representation/text.rs @@ -36,7 +36,7 @@ pub fn apply_code_change_to_id_map(id_map:&mut IdMap, change:&data::text::TextCh info!(logger,"Updating the ID map with the following text edit: {change:?}."); // Remove all entries fully covered by the removed span. - vector.drain_filter(|(span,_)| removed.contains_span(&span)); + vector.drain_filter(|(span,_)| removed.contains_span(span)); // If the edited section ends up being the trailing part of AST node, how many bytes should be // trimmed from the id. Precalculated, as is constant in the loop below. diff --git a/gui/src/rust/ide/src/ide/integration/project.rs b/gui/src/rust/ide/src/ide/integration/project.rs index e83e67df0e0..52177e032a9 100644 --- a/gui/src/rust/ide/src/ide/integration/project.rs +++ b/gui/src/rust/ide/src/ide/integration/project.rs @@ -921,7 +921,7 @@ impl Model { Some(Panic { message,trace }) => Some((Kind::Panic , Some(message),trace)), }?; let propagated = if kind == Kind::Panic { - let root_cause = self.get_node_causing_error_on_current_graph(&trace); + let root_cause = self.get_node_causing_error_on_current_graph(trace); !root_cause.contains(&node_id) } else { // TODO[ao]: traces are not available for Dataflow errors. @@ -939,7 +939,7 @@ impl Model { fn get_node_causing_error_on_current_graph (&self, trace:&[ExpressionId]) -> Option { let node_view_by_expression = self.node_view_by_expression.borrow(); - trace.iter().find_map(|expr_id| node_view_by_expression.get(&expr_id).copied()) + trace.iter().find_map(|expr_id| node_view_by_expression.get(expr_id).copied()) } fn refresh_connection_views @@ -1031,7 +1031,7 @@ impl Model { self.view.show_prompt(); self.prompt_was_shown.set(true); } - self.refresh_computed_infos(&expressions) + self.refresh_computed_infos(expressions) } /// Request controller to detach all attached visualizations. @@ -1200,7 +1200,7 @@ impl Model { fn searcher_opened_in_ui(weak_self:Weak) -> impl Fn(&Self,&graph_editor::NodeId) -> FallibleResult { move |this,displayed_id| { - let node_view = this.view.graph().model.nodes.get_cloned_ref(&displayed_id); + let node_view = this.view.graph().model.nodes.get_cloned_ref(displayed_id); let position = node_view.map(|node| node.position().xy()); let position = position.map(|vector| model::module::Position{vector}); let mode = controller::searcher::Mode::NewNode {position}; @@ -1309,7 +1309,7 @@ impl Model { fn connection_created_in_ui(&self, edge_id:&graph_editor::EdgeId) -> FallibleResult { debug!(self.logger, "Creating connection."); - let displayed = self.view.graph().model.edges.get_cloned(&edge_id).ok_or(GraphEditorInconsistency)?; + let displayed = self.view.graph().model.edges.get_cloned(edge_id).ok_or(GraphEditorInconsistency)?; let con = self.controller_connection_from_displayed(&displayed)?; let inserting = self.connection_views.borrow_mut().insert(con.clone(), *edge_id); if inserting.did_overwrite() { diff --git a/gui/src/rust/ide/src/model/execution_context.rs b/gui/src/rust/ide/src/model/execution_context.rs index 5eff33fab08..605af98790c 100644 --- a/gui/src/rust/ide/src/model/execution_context.rs +++ b/gui/src/rust/ide/src/model/execution_context.rs @@ -122,7 +122,7 @@ impl ComputedValueInfoRegistry { pub fn get_from_info(self:&Rc, id:ExpressionId, mut f:F) -> StaticBoxFuture> where F : FnMut(Rc) -> Option + 'static, T : 'static { - let weak = Rc::downgrade(&self); + let weak = Rc::downgrade(self); if let Some(ret) = self.get(&id).and_then(&mut f) { ready_boxed(Some(ret)) } else { diff --git a/gui/src/rust/ide/src/model/execution_context/synchronized.rs b/gui/src/rust/ide/src/model/execution_context/synchronized.rs index 677d7cef1d1..20be9ccfb96 100644 --- a/gui/src/rust/ide/src/model/execution_context/synchronized.rs +++ b/gui/src/rust/ide/src/model/execution_context/synchronized.rs @@ -115,7 +115,7 @@ impl model::execution_context::API for ExecutionContext { /// Access the registry of computed values information, like types or called method pointers. fn computed_value_info_registry(&self) -> &Rc { - &self.model.computed_value_info_registry() + self.model.computed_value_info_registry() } fn stack_items<'a>(&'a self) -> Box + 'a> { diff --git a/gui/src/rust/ide/src/model/module/synchronized.rs b/gui/src/rust/ide/src/model/module/synchronized.rs index 393f7277bdc..773b23842d2 100644 --- a/gui/src/rust/ide/src/model/module/synchronized.rs +++ b/gui/src/rust/ide/src/model/module/synchronized.rs @@ -71,13 +71,13 @@ impl ParsedContentSummary { } // Get fragment of string with code. - pub fn code_slice(&self) -> &str { &self.slice(&self.code) } + pub fn code_slice(&self) -> &str { self.slice(&self.code) } /// Get fragment of string with id map. - pub fn id_map_slice (&self) -> &str { &self.slice(&self.id_map) } + pub fn id_map_slice (&self) -> &str { self.slice(&self.id_map) } /// Get fragment of string with metadata. - pub fn metadata_slice(&self) -> &str { &self.slice(&self.metadata) } + pub fn metadata_slice(&self) -> &str { self.slice(&self.metadata) } fn slice(&self, range:&Range) -> &str { let start_ix = range.start.to_index(&self.source); @@ -291,7 +291,7 @@ impl Module { self.full_invalidation(summary,new_file).await, LanguageServerContent::Synchronized(summary) => match kind { NotificationKind::Invalidate => - self.partial_invalidation(&summary,new_file).await, + self.partial_invalidation(summary,new_file).await, NotificationKind::CodeChanged{change,replaced_location} => { let code_change = TextEdit { range: replaced_location.into(), @@ -336,7 +336,7 @@ impl Module { debug_assert_eq!(start.column, 0); (source != target).as_some_from(|| { - let edit = TextEdit::from_prefix_postfix_differences(&source, &target); + let edit = TextEdit::from_prefix_postfix_differences(source, target); edit.move_by_lines(start.line) }) } @@ -379,7 +379,7 @@ impl Module { , new_file : &SourceFile , edits : Vec ) -> impl Future> + 'static { - let summary = ParsedContentSummary::from_source(&new_file); + let summary = ParsedContentSummary::from_source(new_file); let edit = language_server::types::FileEdit { edits, path : self.path().file_path().clone(), diff --git a/gui/src/rust/ide/src/model/registry.rs b/gui/src/rust/ide/src/model/registry.rs index 392f0a6ce52..199ca03f12c 100644 --- a/gui/src/rust/ide/src/model/registry.rs +++ b/gui/src/rust/ide/src/model/registry.rs @@ -113,7 +113,7 @@ where K : Clone + Eq + Hash { async fn get(&self, key:&K) -> Result>,LoadingError> { loop { - let entry = self.registry.borrow_mut().get(&key); + let entry = self.registry.borrow_mut().get(key); match entry { Some(Entry::Loaded(state)) => { break Ok(Some(state)); }, Some(Entry::Loading(mut sub)) => { diff --git a/gui/src/rust/ide/view/graph-editor/src/builtin/visualization/native/bubble_chart.rs b/gui/src/rust/ide/view/graph-editor/src/builtin/visualization/native/bubble_chart.rs index b897d6f91f4..6435fd17a42 100644 --- a/gui/src/rust/ide/view/graph-editor/src/builtin/visualization/native/bubble_chart.rs +++ b/gui/src/rust/ide/view/graph-editor/src/builtin/visualization/native/bubble_chart.rs @@ -147,6 +147,6 @@ impl From for Instance { impl display::Object for BubbleChart { fn display_object(&self) -> &display::object::Instance { - &self.model.display_object.display_object() + self.model.display_object.display_object() } } diff --git a/gui/src/rust/ide/view/graph-editor/src/builtin/visualization/native/error.rs b/gui/src/rust/ide/view/graph-editor/src/builtin/visualization/native/error.rs index 002cacd906b..8a128d31de3 100644 --- a/gui/src/rust/ide/view/graph-editor/src/builtin/visualization/native/error.rs +++ b/gui/src/rust/ide/view/graph-editor/src/builtin/visualization/native/error.rs @@ -256,6 +256,6 @@ impl From for Instance { impl display::Object for Error { fn display_object(&self) -> &display::object::Instance { - &self.model.dom.display_object() + self.model.dom.display_object() } } diff --git a/gui/src/rust/ide/view/graph-editor/src/builtin/visualization/native/raw_text.rs b/gui/src/rust/ide/view/graph-editor/src/builtin/visualization/native/raw_text.rs index 4cd46adaf57..502bd3acfd3 100644 --- a/gui/src/rust/ide/view/graph-editor/src/builtin/visualization/native/raw_text.rs +++ b/gui/src/rust/ide/view/graph-editor/src/builtin/visualization/native/raw_text.rs @@ -155,6 +155,6 @@ impl From for Instance { impl display::Object for RawText { fn display_object(&self) -> &display::object::Instance { - &self.dom.display_object() + self.dom.display_object() } } diff --git a/gui/src/rust/ide/view/graph-editor/src/component/breadcrumbs/breadcrumb.rs b/gui/src/rust/ide/view/graph-editor/src/component/breadcrumbs/breadcrumb.rs index f4a63331306..5d581bad063 100644 --- a/gui/src/rust/ide/view/graph-editor/src/component/breadcrumbs/breadcrumb.rs +++ b/gui/src/rust/ide/view/graph-editor/src/component/breadcrumbs/breadcrumb.rs @@ -126,9 +126,9 @@ pub struct Animations { impl Animations { /// Constructor. pub fn new(network:&frp::Network) -> Self { - let color = DEPRECATED_Animation::new(&network); - let fade_in = DEPRECATED_Animation::new(&network); - let separator_color = DEPRECATED_Animation::new(&network); + let color = DEPRECATED_Animation::new(network); + let fade_in = DEPRECATED_Animation::new(network); + let separator_color = DEPRECATED_Animation::new(network); Self{color,separator_color,fade_in} } } diff --git a/gui/src/rust/ide/view/graph-editor/src/component/breadcrumbs/project_name.rs b/gui/src/rust/ide/view/graph-editor/src/component/breadcrumbs/project_name.rs index 253702f6af4..f7791447d29 100644 --- a/gui/src/rust/ide/view/graph-editor/src/component/breadcrumbs/project_name.rs +++ b/gui/src/rust/ide/view/graph-editor/src/component/breadcrumbs/project_name.rs @@ -106,8 +106,8 @@ pub struct Animations { impl Animations { /// Constructor. pub fn new(network:&frp::Network) -> Self { - let color = DEPRECATED_Animation::new(&network); - let position = DEPRECATED_Animation::new(&network); + let color = DEPRECATED_Animation::new(network); + let position = DEPRECATED_Animation::new(network); Self{color,position} } } @@ -257,7 +257,7 @@ impl ProjectName { let hover_color = styles.get_color(theme::graph_editor::breadcrumbs::hover); let deselected_color = styles.get_color(theme::graph_editor::breadcrumbs::deselected::left); let selected_color = styles.get_color(theme::graph_editor::breadcrumbs::selected); - let animations = Animations::new(&network); + let animations = Animations::new(network); frp::extend! { network @@ -292,7 +292,7 @@ impl ProjectName { // === Text Area === text_content <- text.content.map(|txt| txt.to_string()); - eval text_content((content) model.update_alignment(&content)); + eval text_content((content) model.update_alignment(content)); text_width <- text_content.map(f!((content) model.width(content))); frp.source.width <+ text_width; diff --git a/gui/src/rust/ide/view/graph-editor/src/component/edge.rs b/gui/src/rust/ide/view/graph-editor/src/component/edge.rs index bd3d1865887..3c58782c9af 100644 --- a/gui/src/rust/ide/view/graph-editor/src/component/edge.rs +++ b/gui/src/rust/ide/view/graph-editor/src/component/edge.rs @@ -1050,7 +1050,7 @@ impl Frp { def set_disabled = source(); def set_color = source(); } - let shape_events = ShapeViewEventsProxy::new(&network); + let shape_events = ShapeViewEventsProxy::new(network); Self {source_width,source_height,target_position,target_attached,source_attached,redraw ,set_disabled,set_color,hover_position,shape_events} } @@ -1250,7 +1250,7 @@ impl EdgeModelData { front . side_line2 . mod_rotation(|r| r.z = RIGHT_ANGLE); back . side_line2 . mod_rotation(|r| r.z = RIGHT_ANGLE); - let frp = Frp::new(&network); + let frp = Frp::new(network); let source_height = default(); let source_width = default(); let target_position = default(); @@ -1906,7 +1906,7 @@ impl EdgeModelData { (&self, position:Vector2, focus_shape_id:display::object::Id, part: PortType) -> Result{ let snap_data = self.try_point_snap(position,focus_shape_id).ok_or(())?; - let semantic_split = SemanticSplit::new(&self,snap_data.target_shape_id).ok_or(())?; + let semantic_split = SemanticSplit::new(self,snap_data.target_shape_id).ok_or(())?; let angle = self.cut_angle_for_shape(snap_data.target_shape_id,position,part).ok_or(())?; // Completely disable/enable focus for shapes that are not close to the split based on their diff --git a/gui/src/rust/ide/view/graph-editor/src/component/node.rs b/gui/src/rust/ide/view/graph-editor/src/component/node.rs index 8455463e20d..2f681b1b4b8 100644 --- a/gui/src/rust/ide/view/graph-editor/src/component/node.rs +++ b/gui/src/rust/ide/view/graph-editor/src/component/node.rs @@ -436,11 +436,11 @@ impl NodeModel { // Disable shadows to allow interaction with the output port. let shape_system = scene.layers.main.shape_system_registry.shape_system - (&scene,PhantomData::); + (scene,PhantomData::); shape_system.shape_system.set_pointer_events(false); let input = input::Area::new(&logger,app); - let visualization = visualization::Container::new(&logger,&app,registry); + let visualization = visualization::Container::new(&logger,app,registry); display_object.add_child(&visualization); display_object.add_child(&input); @@ -449,7 +449,7 @@ impl NodeModel { let (x,y) = ERROR_VISUALIZATION_SIZE; error_visualization.set_size.emit(Vector2(x,y)); - let action_bar = action_bar::ActionBar::new(&logger,&app); + let action_bar = action_bar::ActionBar::new(&logger,app); display_object.add_child(&action_bar); let output = output::Area::new(&logger,app); @@ -745,7 +745,7 @@ impl Node { // === Color Handling === let bgg = style_frp.get_color(ensogl_theme::graph_editor::node::background); - let profiling_theme = profiling::Theme::from_styles(&style_frp,&network); + let profiling_theme = profiling::Theme::from_styles(style_frp,network); profiling_color <- all_with5 (&frp.set_profiling_status,&frp.set_profiling_min_global_duration, diff --git a/gui/src/rust/ide/view/graph-editor/src/component/node/action_bar.rs b/gui/src/rust/ide/view/graph-editor/src/component/node/action_bar.rs index ff999519908..b7ce7adc184 100644 --- a/gui/src/rust/ide/view/graph-editor/src/component/node/action_bar.rs +++ b/gui/src/rust/ide/view/graph-editor/src/component/node/action_bar.rs @@ -311,6 +311,6 @@ impl ActionBar { impl display::Object for ActionBar { fn display_object(&self) -> &display::object::Instance { - &self.model.display_object() + self.model.display_object() } } diff --git a/gui/src/rust/ide/view/graph-editor/src/component/node/error.rs b/gui/src/rust/ide/view/graph-editor/src/component/node/error.rs index 458606f64ad..3d4b4e0fbb8 100644 --- a/gui/src/rust/ide/view/graph-editor/src/component/node/error.rs +++ b/gui/src/rust/ide/view/graph-editor/src/component/node/error.rs @@ -114,14 +114,14 @@ impl Container { let height = format!("{}.px", height); let z_index = Z_INDEX.to_string(); let border_radius = format!("{}.px", BORDER_RADIUS); - background_dom.dom().set_style_or_warn("width" ,width ,&logger); - background_dom.dom().set_style_or_warn("height" ,height ,&logger); - background_dom.dom().set_style_or_warn("z-index" ,z_index ,&logger); - background_dom.dom().set_style_or_warn("overflow-y" ,"auto" ,&logger); - background_dom.dom().set_style_or_warn("overflow-x" ,"auto" ,&logger); - background_dom.dom().set_style_or_warn("background" ,bg_hex ,&logger); - background_dom.dom().set_style_or_warn("border-radius",border_radius,&logger); - shadow::add_to_dom_element(&background_dom,&styles,&logger); + background_dom.dom().set_style_or_warn("width" ,width ,logger); + background_dom.dom().set_style_or_warn("height" ,height ,logger); + background_dom.dom().set_style_or_warn("z-index" ,z_index ,logger); + background_dom.dom().set_style_or_warn("overflow-y" ,"auto" ,logger); + background_dom.dom().set_style_or_warn("overflow-x" ,"auto" ,logger); + background_dom.dom().set_style_or_warn("background" ,bg_hex ,logger); + background_dom.dom().set_style_or_warn("border-radius",border_radius,logger); + shadow::add_to_dom_element(&background_dom,&styles,logger); background_dom } diff --git a/gui/src/rust/ide/view/graph-editor/src/component/node/input/port.rs b/gui/src/rust/ide/view/graph-editor/src/component/node/input/port.rs index 507c8ba6e02..63deba1fc01 100644 --- a/gui/src/rust/ide/view/graph-editor/src/component/node/input/port.rs +++ b/gui/src/rust/ide/view/graph-editor/src/component/node/input/port.rs @@ -114,7 +114,7 @@ impl Shape { impl display::Object for Shape { fn display_object(&self) -> &display::object::Instance { - &self.root.display_object() + self.root.display_object() } } diff --git a/gui/src/rust/ide/view/graph-editor/src/component/node/output/area.rs b/gui/src/rust/ide/view/graph-editor/src/component/node/output/area.rs index b127877bab8..8f40d081cbc 100644 --- a/gui/src/rust/ide/view/graph-editor/src/component/node/output/area.rs +++ b/gui/src/rust/ide/view/graph-editor/src/component/node/output/area.rs @@ -402,7 +402,7 @@ impl Area { let label_color = color::Animation::new(network); let hysteretic_transition = HystereticAnimation::new( - &network,SHOW_DELAY_DURATION_MS,HIDE_DELAY_DURATION_MS); + network,SHOW_DELAY_DURATION_MS,HIDE_DELAY_DURATION_MS); frp::extend! { network diff --git a/gui/src/rust/ide/view/graph-editor/src/component/node/profiling.rs b/gui/src/rust/ide/view/graph-editor/src/component/node/profiling.rs index 69d34c3b88f..bc74d5a10da 100644 --- a/gui/src/rust/ide/view/graph-editor/src/component/node/profiling.rs +++ b/gui/src/rust/ide/view/graph-editor/src/component/node/profiling.rs @@ -220,7 +220,7 @@ impl ProfilingLabel { // === Color === let styles = StyleWatchFrp::new(&scene.style_sheet); - let theme = Theme::from_styles(&styles,&network); + let theme = Theme::from_styles(&styles,network); color.target_color <+ all_with4 (&frp.set_status,&frp.set_min_global_duration,&frp.set_max_global_duration,&theme, |&status,&min,&max,&theme| status.display_color(min,max,theme) diff --git a/gui/src/rust/ide/view/graph-editor/src/component/node/vcs.rs b/gui/src/rust/ide/view/graph-editor/src/component/node/vcs.rs index 996156ae9b3..f0bbf18a7a2 100644 --- a/gui/src/rust/ide/view/graph-editor/src/component/node/vcs.rs +++ b/gui/src/rust/ide/view/graph-editor/src/component/node/vcs.rs @@ -188,7 +188,7 @@ impl StatusIndicator { impl display::Object for StatusIndicator { fn display_object(&self) -> &display::object::Instance { - &self.model.display_object() + self.model.display_object() } } diff --git a/gui/src/rust/ide/view/graph-editor/src/component/tooltip.rs b/gui/src/rust/ide/view/graph-editor/src/component/tooltip.rs index 33f4365979d..40f029e24ad 100644 --- a/gui/src/rust/ide/view/graph-editor/src/component/tooltip.rs +++ b/gui/src/rust/ide/view/graph-editor/src/component/tooltip.rs @@ -192,7 +192,7 @@ impl Tooltip { ensogl_theme::application::tooltip::show_delay_duration_ms,0.0); let hysteretic_transition = HystereticAnimation::new( - &network,hide_delay_duration_ms,show_delay_duration_ms); + network,hide_delay_duration_ms,show_delay_duration_ms); frp::extend! { network @@ -240,6 +240,6 @@ impl Tooltip { impl display::Object for Tooltip { fn display_object(&self) -> &display::object::Instance { - &self.model.root.display_object() + self.model.root.display_object() } } diff --git a/gui/src/rust/ide/view/graph-editor/src/component/type_coloring.rs b/gui/src/rust/ide/view/graph-editor/src/component/type_coloring.rs index 0e9382ae771..24430a07537 100644 --- a/gui/src/rust/ide/view/graph-editor/src/component/type_coloring.rs +++ b/gui/src/rust/ide/view/graph-editor/src/component/type_coloring.rs @@ -69,7 +69,7 @@ fn auto_hue(tp:&Type, styles:&StyleWatch) -> f32 { // Defines how many hue values we can have based on our incoming type name. let hue_steps = styles.get_number_or(theme::code::types::hue_steps,512.0); let hue_shift = styles.get_number_or(theme::code::types::hue_shift,0.0); - (hash(&tp) % (hue_steps as u64)) as f32 / hue_steps + hue_shift + (hash(tp) % (hue_steps as u64)) as f32 / hue_steps + hue_shift } /// Compute the hash of the type for use in the `compute` function. diff --git a/gui/src/rust/ide/view/graph-editor/src/component/visualization/container.rs b/gui/src/rust/ide/view/graph-editor/src/component/visualization/container.rs index b7cc3f0a308..6a447d80d6e 100644 --- a/gui/src/rust/ide/view/graph-editor/src/component/visualization/container.rs +++ b/gui/src/rust/ide/view/graph-editor/src/component/visualization/container.rs @@ -265,7 +265,7 @@ impl ContainerModel { let scene = scene.clone_ref(); let is_fullscreen = default(); let size = default(); - let action_bar = ActionBar::new(&app,registry.clone_ref()); + let action_bar = ActionBar::new(app,registry.clone_ref()); view.add_child(&action_bar); Self {logger,display_object,drag_root,visualization,vis_frp_connection,scene,view @@ -308,7 +308,7 @@ impl ContainerModel { if let Some(viz) = &*self.visualization.borrow() { self.fullscreen_view.add_child(viz); if let Some(dom) = viz.root_dom() { - self.scene.dom.layers.fullscreen_vis.manage(&dom); + self.scene.dom.layers.fullscreen_vis.manage(dom); } viz.inputs.activate.emit(()); } @@ -319,7 +319,7 @@ impl ContainerModel { if let Some(viz) = &*self.visualization.borrow() { self.view.add_child(viz); if let Some(dom) = viz.root_dom() { - self.scene.dom.layers.back.manage(&dom); + self.scene.dom.layers.back.manage(dom); } viz.inputs.deactivate.emit(()); } @@ -479,7 +479,7 @@ impl Container { let logger = &self.model.logger; let action_bar = &model.action_bar.frp; let registry = &model.registry; - let selection = Animation::new(&network); + let selection = Animation::new(network); frp::extend! { network eval frp.set_visibility ((v) model.set_visibility(*v)); diff --git a/gui/src/rust/ide/view/graph-editor/src/component/visualization/container/action_bar.rs b/gui/src/rust/ide/view/graph-editor/src/component/visualization/container/action_bar.rs index 48bda7205f9..6e887cc89f5 100644 --- a/gui/src/rust/ide/view/graph-editor/src/component/visualization/container/action_bar.rs +++ b/gui/src/rust/ide/view/graph-editor/src/component/visualization/container/action_bar.rs @@ -266,7 +266,7 @@ impl Model { let logger = Logger::new("ActionBarModel"); let background = background::View::new(&logger); let hover_area = hover_area::View::new(&logger); - let visualization_chooser = VisualizationChooser::new(&app,vis_registry); + let visualization_chooser = VisualizationChooser::new(app,vis_registry); let display_object = display::object::Instance::new(&logger); let size = default(); let icons = Icons::new(logger); @@ -415,6 +415,6 @@ impl ActionBar { impl display::Object for ActionBar { fn display_object(&self) -> &display::object::Instance { - &self.model.display_object() + self.model.display_object() } } diff --git a/gui/src/rust/ide/view/graph-editor/src/component/visualization/container/visualization_chooser.rs b/gui/src/rust/ide/view/graph-editor/src/component/visualization/container/visualization_chooser.rs index e6749e67c7b..0e94528803f 100644 --- a/gui/src/rust/ide/view/graph-editor/src/component/visualization/container/visualization_chooser.rs +++ b/gui/src/rust/ide/view/graph-editor/src/component/visualization/container/visualization_chooser.rs @@ -59,7 +59,7 @@ struct Model { impl Model { pub fn new(app:&Application, registry:visualization::Registry) -> Self { - let selection_menu = drop_down_menu::DropDownMenu::new(&app); + let selection_menu = drop_down_menu::DropDownMenu::new(app); app.display.scene().layers.below_main.add_exclusive(&selection_menu); Self{selection_menu,registry} } diff --git a/gui/src/rust/ide/view/graph-editor/src/component/visualization/foreign/java_script/definition.rs b/gui/src/rust/ide/view/graph-editor/src/component/visualization/foreign/java_script/definition.rs index 95a4be9a22d..aebeb34cf40 100644 --- a/gui/src/rust/ide/view/graph-editor/src/component/visualization/foreign/java_script/definition.rs +++ b/gui/src/rust/ide/view/graph-editor/src/component/visualization/foreign/java_script/definition.rs @@ -64,7 +64,7 @@ impl Definition { let source = source.as_ref(); let source = source; let context = JsValue::NULL; - let function = Function::new_with_args(binding::JS_CLASS_NAME,&source) + let function = Function::new_with_args(binding::JS_CLASS_NAME,source) .map_err(Error::InvalidFunction)?; let js_class = binding::js_class(); let class = function.call1(&context,&js_class).map_err(Error::InvalidFunction)?; diff --git a/gui/src/rust/ide/view/graph-editor/src/component/visualization/foreign/java_script/instance.rs b/gui/src/rust/ide/view/graph-editor/src/component/visualization/foreign/java_script/instance.rs index d23f16ccefd..01b4de7a394 100644 --- a/gui/src/rust/ide/view/graph-editor/src/component/visualization/foreign/java_script/instance.rs +++ b/gui/src/rust/ide/view/graph-editor/src/component/visualization/foreign/java_script/instance.rs @@ -145,7 +145,7 @@ impl InstanceModel { -> result::Result { let js_new = js_sys::Function::new_with_args("cls,arg", "return new cls(arg)"); let context = JsValue::NULL; - let object = js_new.call2(&context,&class,&args.into()) + let object = js_new.call2(&context,class,&args.into()) .map_err(|js_error|Error::ConstructorError {js_error})?; if !object.is_object() { return Err(Error::ValueIsNotAnObject { object } ) @@ -164,7 +164,7 @@ impl InstanceModel { let object = Self::instantiate_class_with_args(class,init_data)?; let on_data_received = get_method(object.as_ref(),method::ON_DATA_RECEIVED).ok(); let on_data_received = Rc::new(on_data_received); - let set_size = get_method(&object.as_ref(),method::SET_SIZE).ok(); + let set_size = get_method(object.as_ref(),method::SET_SIZE).ok(); let set_size = Rc::new(set_size); let object = Rc::new(object); let scene = scene.clone_ref(); @@ -245,7 +245,7 @@ impl Instance { let frp = visualization::instance::Frp::new(&network); let model = InstanceModel::from_class(class,scene)?; model.set_dom_layer(&scene.dom.layers.back); - Ok(Instance{model,frp,network}.init_frp(&scene).init_preprocessor_change_callback()) + Ok(Instance{model,frp,network}.init_frp(scene).init_preprocessor_change_callback()) } fn init_frp(self, scene:&Scene) -> Self { @@ -292,7 +292,7 @@ impl From for visualization::Instance { impl display::Object for Instance { fn display_object(&self) -> &display::object::Instance { - &self.model.root_node.display_object() + self.model.root_node.display_object() } } diff --git a/gui/src/rust/ide/view/graph-editor/src/component/visualization/instance.rs b/gui/src/rust/ide/view/graph-editor/src/component/visualization/instance.rs index 887d744f291..a4cd3bbe8fb 100644 --- a/gui/src/rust/ide/view/graph-editor/src/component/visualization/instance.rs +++ b/gui/src/rust/ide/view/graph-editor/src/component/visualization/instance.rs @@ -159,7 +159,7 @@ impl FrpInputs { impl Frp { /// Constructor. pub fn new(network:&frp::Network) -> Self { - let inputs = FrpInputs::new(&network); + let inputs = FrpInputs::new(network); frp::extend! { network def preprocessor_change = source(); on_preprocessor_change <- preprocessor_change.sampler(); diff --git a/gui/src/rust/ide/view/graph-editor/src/lib.rs b/gui/src/rust/ide/view/graph-editor/src/lib.rs index 4a9a571590b..fad27576cde 100644 --- a/gui/src/rust/ide/view/graph-editor/src/lib.rs +++ b/gui/src/rust/ide/view/graph-editor/src/lib.rs @@ -631,7 +631,7 @@ impl Node { impl display::Object for Node { fn display_object(&self) -> &display::object::Instance { - &self.view.display_object() + self.view.display_object() } } @@ -705,7 +705,7 @@ impl Edge { impl display::Object for Edge { fn display_object(&self) -> &display::object::Instance { - &self.view.display_object() + self.view.display_object() } } @@ -1110,8 +1110,8 @@ pub struct TouchState { impl TouchState { pub fn new(network:&frp::Network, mouse:&frp::io::Mouse) -> Self { - let nodes = TouchNetwork::::new(&network,mouse); - let background = TouchNetwork::<()>::new(&network,mouse); + let nodes = TouchNetwork::::new(network,mouse); + let background = TouchNetwork::<()>::new(network,mouse); Self {nodes,background} } } @@ -1163,7 +1163,7 @@ struct NodeCreationContext<'a> { impl GraphEditorModelWithNetwork { pub fn new(app:&Application, cursor:cursor::Cursor, frp:&Frp) -> Self { let network = frp.network.clone_ref(); // FIXME make weak - let model = GraphEditorModel::new(app,cursor,&frp); + let model = GraphEditorModel::new(app,cursor,frp); Self {model,network} } @@ -1428,7 +1428,7 @@ impl GraphEditorModel { let breadcrumbs = component::Breadcrumbs::new(app.clone_ref()); let app = app.clone_ref(); let frp = frp.output.clone_ref(); - let navigator = Navigator::new(&scene,&scene.camera()); + let navigator = Navigator::new(scene,&scene.camera()); let tooltip = Tooltip::new(&app); let profiling_statuses = profiling::Statuses::new(); let profiling_button = component::profiling::Button::new(&app); @@ -2316,12 +2316,12 @@ fn new_graph_editor(app:&Application) -> GraphEditor { out.source.nodes_labels_visible <+ out.node_edit_mode || node_in_edit_mode; eval out.node_editing_started ([model] (id) { - if let Some(node) = model.nodes.get_cloned_ref(&id) { + if let Some(node) = model.nodes.get_cloned_ref(id) { node.model.input.frp.set_edit_mode(true); } }); eval out.node_editing_finished ([model](id) { - if let Some(node) = model.nodes.get_cloned_ref(&id) { + if let Some(node) = model.nodes.get_cloned_ref(id) { node.model.input.set_edit_mode(false); } }); @@ -2333,8 +2333,8 @@ fn new_graph_editor(app:&Application) -> GraphEditor { node_pointer_style <- source::(); node_tooltip <- source::(); - let node_input_touch = TouchNetwork::::new(&network,&mouse); - let node_output_touch = TouchNetwork::::new(&network,&mouse); + let node_input_touch = TouchNetwork::::new(network,mouse); + let node_output_touch = TouchNetwork::::new(network,mouse); node_expression_set <- source(); out.source.node_expression_set <+ node_expression_set; @@ -2648,9 +2648,9 @@ fn new_graph_editor(app:&Application) -> GraphEditor { // === Snapping === eval drag_tgts ((ids) model.disable_grid_snapping_for(ids)); - let node_tgt_pos_anim = DEPRECATED_Animation::>::new(&network); - let x_snap_strength = DEPRECATED_Tween::new(&network); - let y_snap_strength = DEPRECATED_Tween::new(&network); + let node_tgt_pos_anim = DEPRECATED_Animation::>::new(network); + let x_snap_strength = DEPRECATED_Tween::new(network); + let y_snap_strength = DEPRECATED_Tween::new(network); x_snap_strength.set_duration(300.0); y_snap_strength.set_duration(300.0); diff --git a/gui/src/rust/ide/view/graph-editor/src/profiling.rs b/gui/src/rust/ide/view/graph-editor/src/profiling.rs index 7d1e1927b8f..5056c96f4c2 100644 --- a/gui/src/rust/ide/view/graph-editor/src/profiling.rs +++ b/gui/src/rust/ide/view/graph-editor/src/profiling.rs @@ -79,7 +79,7 @@ impl Statuses { })); min_and_max_from_remove <- frp.remove.map(f!([durations](node) { - durations.borrow_mut().remove_by_left(&node); + durations.borrow_mut().remove_by_left(node); Self::min_and_max(&*durations.borrow()) })); diff --git a/gui/src/rust/ide/view/src/code_editor.rs b/gui/src/rust/ide/view/src/code_editor.rs index 85503e5805b..d27c92efa96 100644 --- a/gui/src/rust/ide/view/src/code_editor.rs +++ b/gui/src/rust/ide/view/src/code_editor.rs @@ -122,7 +122,7 @@ impl View { } impl display::Object for View { - fn display_object(&self) -> &display::object::Instance { &self.model.display_object() } + fn display_object(&self) -> &display::object::Instance { self.model.display_object() } } impl application::command::FrpNetworkProvider for View { @@ -135,7 +135,7 @@ impl application::View for View { fn new(app: &Application) -> Self { Self::new(app) } fn app(&self) -> &Application { - &self.model.app() + self.model.app() } fn default_shortcuts() -> Vec { diff --git a/gui/src/rust/ide/view/src/debug_scenes/interface.rs b/gui/src/rust/ide/view/src/debug_scenes/interface.rs index ae4d8847d09..72532448444 100644 --- a/gui/src/rust/ide/view/src/debug_scenes/interface.rs +++ b/gui/src/rust/ide/view/src/debug_scenes/interface.rs @@ -89,7 +89,7 @@ fn init(app:&Application) { let world = &app.display; let scene = world.scene(); let camera = scene.camera(); - let navigator = Navigator::new(&scene,&camera); + let navigator = Navigator::new(scene,&camera); app.views.register::(); app.views.register::(); diff --git a/gui/src/rust/ide/view/src/debug_scenes/visualization.rs b/gui/src/rust/ide/view/src/debug_scenes/visualization.rs index ce9e74c44d4..68a330a7954 100644 --- a/gui/src/rust/ide/view/src/debug_scenes/visualization.rs +++ b/gui/src/rust/ide/view/src/debug_scenes/visualization.rs @@ -91,7 +91,7 @@ fn init(app:&Application) { let world = &app.display; let scene = world.scene(); let camera = scene.camera(); - let navigator = Navigator::new(&scene,&camera); + let navigator = Navigator::new(scene,&camera); let registry = Registry::new(); registry.add(constructor_graph()); @@ -100,7 +100,7 @@ fn init(app:&Application) { let vis_class = vis_factories.iter().find(|class| { &*class.signature.name == "Graph" }).expect("Couldn't find Graph class."); - let visualization = vis_class.new_instance(&scene).expect("Couldn't create visualiser."); + let visualization = vis_class.new_instance(scene).expect("Couldn't create visualiser."); visualization.activate.emit(()); let network = enso_frp::Network::new("VisualizationExample"); diff --git a/gui/src/rust/ide/view/src/searcher.rs b/gui/src/rust/ide/view/src/searcher.rs index 9851a193e23..c785a155e55 100644 --- a/gui/src/rust/ide/view/src/searcher.rs +++ b/gui/src/rust/ide/view/src/searcher.rs @@ -100,7 +100,7 @@ impl Model { let logger = Logger::new("SearcherView"); let display_object = display::object::Instance::new(&logger); let list = app.new_view::(); - let documentation = documentation::View::new(&scene); + let documentation = documentation::View::new(scene); let doc_provider = default(); scene.layers.above_nodes.add_exclusive(&list); display_object.add_child(&documentation); @@ -199,7 +199,7 @@ impl View { let frp = &self.frp; let source = &self.frp.source; - let height = DEPRECATED_Animation::::new(&network); + let height = DEPRECATED_Animation::::new(network); frp::extend! { network eval frp.set_actions ([model] ((entries,docs)) { diff --git a/gui/src/rust/ide/view/src/status_bar.rs b/gui/src/rust/ide/view/src/status_bar.rs index 4c785c2a3ac..def8e97e8c8 100644 --- a/gui/src/rust/ide/view/src/status_bar.rs +++ b/gui/src/rust/ide/view/src/status_bar.rs @@ -269,7 +269,7 @@ impl View { /// Create new StatusBar view. pub fn new(app:&Application) -> Self { let frp = Frp::new(); - let model = Model::new(&app); + let model = Model::new(app); let network = &frp.network; let scene = app.display.scene(); diff --git a/gui/src/rust/ide/view/src/window_control_buttons.rs b/gui/src/rust/ide/view/src/window_control_buttons.rs index 98ac56b524a..0acde112294 100644 --- a/gui/src/rust/ide/view/src/window_control_buttons.rs +++ b/gui/src/rust/ide/view/src/window_control_buttons.rs @@ -220,7 +220,7 @@ impl View { let style = StyleWatchFrp::new(&app.display.scene().style_sheet); let style_frp = LayoutParams::from_theme(&style); - let layout_style = style_frp.flatten(&network); + let layout_style = style_frp.flatten(network); frp::extend! { network // Layout diff --git a/gui/src/rust/ide/view/src/window_control_buttons/common.rs b/gui/src/rust/ide/view/src/window_control_buttons/common.rs index 4752dab4350..dd95523c8f0 100644 --- a/gui/src/rust/ide/view/src/window_control_buttons/common.rs +++ b/gui/src/rust/ide/view/src/window_control_buttons/common.rs @@ -228,14 +228,14 @@ impl View { // Icon color initialization let default_icon_color_path = Shape::icon_color_path(State::Unconcerned); let default_icon_color = style.get_color(default_icon_color_path).value(); - let icon_color = color::Animation::new(&network); + let icon_color = color::Animation::new(network); icon_color.target(color::Lcha::from(default_icon_color)); model.set_icon_color(default_icon_color); // Background color initialization let default_background_color_path = Shape::background_color_path(State::Unconcerned); let default_background_color = style.get_color(default_background_color_path).value(); - let background_color = color::Animation::new(&network); + let background_color = color::Animation::new(network); background_color.target(color::Lcha::from(default_background_color)); model.set_icon_color(default_background_color); diff --git a/gui/src/rust/lib/frp/src/nodes.rs b/gui/src/rust/lib/frp/src/nodes.rs index 81513b6839e..8f29a8b855d 100644 --- a/gui/src/rust/lib/frp/src/nodes.rs +++ b/gui/src/rust/lib/frp/src/nodes.rs @@ -2119,7 +2119,7 @@ impl stream::EventConsumer> for OwnedMap2 where T1:EventOutput, T2:EventOutput, Out:Data, F:'static+Fn(&Output,&Output)->Out { fn on_event(&self, stack:CallStack, value1:&Output) { let value2 = self.src2.value(); - let out = (self.function)(&value1,&value2); + let out = (self.function)(value1,&value2); self.emit_event(stack,&out); } } @@ -2176,7 +2176,7 @@ where T1:EventOutput, T2:EventOutput, T3:EventOutput, Out:Data, fn on_event(&self, stack:CallStack, value1:&Output) { let value2 = self.src2.value(); let value3 = self.src3.value(); - let out = (self.function)(&value1,&value2,&value3); + let out = (self.function)(value1,&value2,&value3); self.emit_event(stack,&out); } } @@ -2236,7 +2236,7 @@ impl stream::EventConsumer> for OwnedMap4 AutomataRegistryModel { self.states.insert(alt_repr.clone(),out); } else { let key = name; - path.push(&key); + path.push(key); path.sort_unstable(); let repr = path.join(" "); state = match self.states.get(&repr) { diff --git a/gui/src/rust/lib/system/web/src/stream.rs b/gui/src/rust/lib/system/web/src/stream.rs index fa54641283c..69c84373454 100644 --- a/gui/src/rust/lib/system/web/src/stream.rs +++ b/gui/src/rust/lib/system/web/src/stream.rs @@ -51,9 +51,9 @@ pub trait BlobExt { impl BlobExt for web_sys::Blob { fn stream(&self) -> Result { let this = self.as_ref(); - let method_as_value = js_sys::Reflect::get(&this,&"stream".into())?; + let method_as_value = js_sys::Reflect::get(this,&"stream".into())?; let method = method_as_value.dyn_into::()?; - Ok(method.call0(&this)?.dyn_into()?) + Ok(method.call0(this)?.dyn_into()?) } fn stream_reader(&self) -> Result {