From 5b4cdbf0914627e8cf3d432fdc12cba60a7ba460 Mon Sep 17 00:00:00 2001 From: Yumeoto Zorin Date: Fri, 28 Oct 2022 20:29:25 +0800 Subject: [PATCH] Update errors.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加缺失的`dyn`关键字 --- src/advance/errors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/advance/errors.md b/src/advance/errors.md index c593f520..f9b995a3 100644 --- a/src/advance/errors.md +++ b/src/advance/errors.md @@ -277,7 +277,7 @@ fn main() { use std::fmt::{Debug, Display}; pub trait Error: Debug + Display { - fn source(&self) -> Option<&(Error + 'static)> { ... } + fn source(&self) -> Option<&(dyn Error + 'static)> { ... } } ```