小编Gab*_*rez的帖子

构建失败并显示错误:即使在成功的 rustup 覆盖设置每晚之后,Pear 也需要 rustc 的 'dev' 或 'nightly' 版本

  • Windows 10
  • rustup 1.23.1 (3df2264a9 2020-11-30)
  • 默认 rustc 1.50.0 (cb75ad5db 2021-02-10)
  • 项目 rustc 1.52.0-nightly (4a8b6f708 2021-03-11)
  • 火箭=“0.4.4”

我正在尝试使用 Rocket 构建一个 Rust 项目,但在编译时我总是遇到此错误,即使在成功覆盖项目的工具链之后也是如此:

D:\GitHub\Learning-Rust\poke_api> rustup override set nightly
info: using existing install for 'nightly-x86_64-pc-windows-msvc'
info: override toolchain for 'D:\GitHub\Learning-Rust\poke_api' set to 'nightly-x86_64-pc-windows-msvc'

  nightly-x86_64-pc-windows-msvc unchanged - rustc 1.52.0-nightly (4a8b6f708 2021-03-11)

PS D:\GitHub\Learning-Rust\poke_api> cargo build
   Compiling winapi v0.3.9
   Compiling serde_derive v1.0.124
   Compiling rocket v0.4.7
   Compiling pear_codegen v0.1.4
   Compiling rocket_codegen v0.4.7
   Compiling proc-macro2 v1.0.24
   Compiling pq-sys v0.4.6
   Compiling aho-corasick v0.6.10
   Compiling serde_json v1.0.64
error: …
Run Code Online (Sandbox Code Playgroud)

rust rustup rust-rocket

6
推荐指数
1
解决办法
8349
查看次数

Vue 3组件不渲染但显示在元素树上

我是 vue 新手,我试图将我的一个组件更改为新语法来学习 vue 3。该组件在更改之前工作得很好,所以我一定错过了一些东西。

这是母组件:

<template>
  <div class="user-profile">
    <div>
      <div class="user-profile__user-panel">
        <h1 class="user-profile__username">@{{ user.username }}</h1>
        <div v-if="user.isAdmin" class="user-profile__admin-badge">Admin</div>
        <div class="user-profile__follower-count">
          <string><b>Followers: </b></string> {{ followers }}
        </div>
      </div>
      <NewTwoot @create-twoot="createNewTwoot" />
    </div>
    <div class="user-profile__twoots-wraper">
      <TwootItem
        v-for="twoot in user.twoots"
        :username="user.username"
        :key="twoot.id"
        :twoot="twoot"
        @favorit="toggleFavorite(id)"
      />
    </div>
  </div>
</template>

<script>
import TwootItem from "./TwootItem.vue";

export default {
  name: "UserProfile",
  components: {
    TwootItem,
  },
  data() {
    return {
      followers: 0,
      user: {
        id: 1,
        username: "GabrielBG",
        firstName: "Gabriel",
        lastName: "Gutierrez",
        email: "gbg@scienceiscoll.com",
        isAdmin: true, …
Run Code Online (Sandbox Code Playgroud)

javascript vue.js vuejs3

5
推荐指数
1
解决办法
4188
查看次数

标签 统计

javascript ×1

rust ×1

rust-rocket ×1

rustup ×1

vue.js ×1

vuejs3 ×1