我有这个:
#[derive(FromPrimitive)]
pub enum MyEnum {
Var1 = 1,
Var2
}
Run Code Online (Sandbox Code Playgroud)
还有一个错误:
error: cannot find derive macro `FromPrimitive` in this scope
|
38 | #[derive(FromPrimitive)]
| ^^^^^^^^^^^^^
Run Code Online (Sandbox Code Playgroud)
为什么我这样做?我如何解决它?
我想为 git 使用其他 IdentityFile。我想动态使用它,而不是通过配置。我这样做:
$ GIT_SSH_COMMAND='ssh -i /home/my_user/.ssh/id_ed25519' git pull origin master
repository access denied.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)
pub 密钥“id_ed25519.pub”在我的 bitbucket 中。
这也失败了:
$ git pull origin master
repository access denied.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)
和:
$ git remote -v
origin git@bitbucket.org:company123/repo456.git (fetch)
origin git@bitbucket.org:company123/repo456.git (push)
Run Code Online (Sandbox Code Playgroud)
将 …
例如,这行不通:
puts "hello"
"""
var1 = 123
var2 = "#{var3}" # exception!
"""
Run Code Online (Sandbox Code Playgroud)
这将在运行时抛出异常,即使代码应该作为注释被跳过。