Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Fix warning in rustdoc job #8159

Merged
merged 4 commits into from
Feb 19, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -463,30 +463,6 @@ build-macos-subkey:
tags:
- osx

build-rust-doc:
stage: build
<<: *docker-env
<<: *test-refs
needs:
- job: test-linux-stable
artifacts: false
variables:
<<: *default-vars
RUSTFLAGS: -Dwarnings
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}-doc"
when: on_success
expire_in: 7 days
paths:
- ./crate-docs/
script:
- rm -f ./crate-docs/index.html # use it as an indicator if the job succeeds
- SKIP_WASM_BUILD=1 RUSTDOCFLAGS="--html-in-header $(pwd)/.maintain/rustdoc-header.html"
time cargo +nightly doc --no-deps --workspace --all-features --verbose
- mv ./target/doc ./crate-docs
- echo "<meta http-equiv=refresh content=0;url=sc_service/index.html>" > ./crate-docs/index.html
- sccache -s

#### stage: publish

.build-push-docker-image: &build-push-docker-image
Expand Down
6 changes: 1 addition & 5 deletions client/api/src/in_mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,6 @@ impl<Block: BlockT> ProvideChtRoots<Block> for Blockchain<Block> {
/// In-memory operation.
pub struct BlockImportOperation<Block: BlockT> {
pending_block: Option<PendingBlock<Block>>,
pending_cache: HashMap<CacheKeyId, Vec<u8>>,
old_state: InMemoryBackend<HashFor<Block>>,
new_state: Option<<InMemoryBackend<HashFor<Block>> as StateBackend<HashFor<Block>>>::Transaction>,
aux: Vec<(Vec<u8>, Option<Vec<u8>>)>,
Expand Down Expand Up @@ -520,9 +519,7 @@ impl<Block: BlockT> backend::BlockImportOperation<Block> for BlockImportOperatio
Ok(())
}

fn update_cache(&mut self, cache: HashMap<CacheKeyId, Vec<u8>>) {
self.pending_cache = cache;
}
fn update_cache(&mut self, _cache: HashMap<CacheKeyId, Vec<u8>>) {}

fn update_db_storage(
&mut self,
Expand Down Expand Up @@ -637,7 +634,6 @@ impl<Block: BlockT> backend::Backend<Block> for Backend<Block> where Block::Hash
let old_state = self.state_at(BlockId::Hash(Default::default()))?;
Ok(BlockImportOperation {
pending_block: None,
pending_cache: Default::default(),
old_state,
new_state: None,
aux: Default::default(),
Expand Down
2 changes: 1 addition & 1 deletion client/cli/src/arg_enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ impl Into<sc_service::config::RpcMethods> for RpcMethods {
pub enum Database {
/// Facebooks RocksDB
RocksDb,
/// ParityDb. https://github.com/paritytech/parity-db/
/// ParityDb. <https://github.com/paritytech/parity-db/>
ParityDb,
}

Expand Down
3 changes: 1 addition & 2 deletions client/finality-grandpa-warp-sync/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.

//! Helper for handling (i.e. answering) grandpa warp sync requests from a remote peer via the
//! [`crate::request_responses::RequestResponsesBehaviour`].
//! Helper for handling (i.e. answering) grandpa warp sync requests from a remote peer.

use codec::Decode;
use sc_network::config::{IncomingRequest, OutgoingResponse, ProtocolId, RequestResponseConfig};
Expand Down
6 changes: 3 additions & 3 deletions frame/system/src/limits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ pub struct WeightsPerClass {
/// `on_initialize` pallet callbacks are invoked and their cost is added before any extrinsic
/// is executed. This cost is tracked as `Mandatory` dispatch class.
///
/// ```ignore
/// ```text,ignore
/// | | `max_block` | |
/// | | | |
/// | | | |
Expand All @@ -148,7 +148,7 @@ pub struct WeightsPerClass {
/// one `Normal`). Each class has it's own limit `max_total`, but also the sum cannot exceed
/// `max_block` value.
///
/// ```ignore
/// ```text,ignore
/// -- `Mandatory` limit (unlimited)
/// | # | | |
/// | # | `Ext3` | - - `Operational` limit
Expand All @@ -170,7 +170,7 @@ pub struct WeightsPerClass {
/// out lower-priority `Operational` transactions. In such cases you might add a `reserved` capacity
/// for given class.
///
/// ```ignore
/// ```test,ignore
/// _
/// # \
/// # `Ext8` - `reserved`
Expand Down
52 changes: 33 additions & 19 deletions primitives/state-machine/src/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -575,27 +575,41 @@ where
#[cfg(feature = "std")]
fn storage_changes_root(&mut self, parent_hash: &[u8]) -> Result<Option<Vec<u8>>, ()> {
let _guard = guard();
let root = self.overlay.changes_trie_root(
self.backend,
self.changes_trie_state.as_ref(),
Decode::decode(&mut &parent_hash[..]).map_err(|e|
trace!(
target: "state",
"Failed to decode changes root parent hash: {}",
e,
)
)?,
true,
self.storage_transaction_cache,
);
if let Some(ref root) = self.storage_transaction_cache.changes_trie_transaction_storage_root {
trace!(
target: "state",
"{:04x}: ChangesRoot({})(cached) {:?}",
self.id,
HexDisplay::from(&parent_hash),
root,
);

trace!(target: "state", "{:04x}: ChangesRoot({}) {:?}",
self.id,
HexDisplay::from(&parent_hash),
root,
);
Ok(Some(root.encode()))
} else {
let root = self.overlay.changes_trie_root(
self.backend,
self.changes_trie_state.as_ref(),
Decode::decode(&mut &parent_hash[..]).map_err(|e|
trace!(
target: "state",
"Failed to decode changes root parent hash: {}",
e,
)
)?,
true,
self.storage_transaction_cache,
);

trace!(
target: "state",
"{:04x}: ChangesRoot({}) {:?}",
self.id,
HexDisplay::from(&parent_hash),
root,
);

root.map(|r| r.map(|o| o.encode()))
root.map(|r| r.map(|o| o.encode()))
}
}

fn storage_start_transaction(&mut self) {
Expand Down