Initial Commit
This commit is contained in:
commit
669e48899f
115
C-Binary-Search-Tree/main.c
Normal file
115
C-Binary-Search-Tree/main.c
Normal file
@ -0,0 +1,115 @@
|
||||
// Binary Search Tree operations in C
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
struct node {
|
||||
int key;
|
||||
struct node *left, *right;
|
||||
};
|
||||
|
||||
// Create a node
|
||||
struct node *newNode(int item) {
|
||||
struct node *newNode = (struct node *)malloc(sizeof(struct node));
|
||||
newNode -> key = item;
|
||||
newNode -> left = NULL;
|
||||
newNode -> right = NULL;
|
||||
return newNode;
|
||||
}
|
||||
|
||||
// Inorder Traversal
|
||||
void inorder(struct node *root) {
|
||||
if (root != NULL) {
|
||||
// Traverse left
|
||||
inorder(root->left);
|
||||
|
||||
// Traverse root
|
||||
printf("%d -> ", root->key);
|
||||
|
||||
// Traverse right
|
||||
inorder(root->right);
|
||||
}
|
||||
}
|
||||
|
||||
// Insert a node
|
||||
struct node *insert(struct node *node, int key) {
|
||||
// Return a new node if the tree is empty
|
||||
if (node == NULL) return newNode(key);
|
||||
|
||||
// Traverse to the right place and insert the node
|
||||
if (key < node->key) {
|
||||
node->left = insert(node->left, key);
|
||||
} else {
|
||||
node->right = insert(node->right, key);
|
||||
}
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
// Find the inorder successor
|
||||
struct node *minValueNode(struct node *node) {
|
||||
struct node *current = node;
|
||||
|
||||
// Find the leftmost leaf
|
||||
while (current && current->left != NULL) {
|
||||
current = current->left;
|
||||
}
|
||||
|
||||
return current;
|
||||
}
|
||||
|
||||
// Deleting a node
|
||||
struct node *deleteNode(struct node *root, int key) {
|
||||
// Return if the tree is empty
|
||||
if (root == NULL) return root;
|
||||
|
||||
// Find the node to be deleted
|
||||
if (key < root->key)
|
||||
root->left = deleteNode(root->left, key);
|
||||
else if (key > root->key)
|
||||
root->right = deleteNode(root->right, key);
|
||||
|
||||
else {
|
||||
// If the node is with only one child or no child
|
||||
if (root->left == NULL) {
|
||||
struct node *temp = root->right;
|
||||
free(root);
|
||||
return temp;
|
||||
} else if (root->right == NULL) {
|
||||
struct node *temp = root->left;
|
||||
free(root);
|
||||
return temp;
|
||||
}
|
||||
|
||||
// If the node has two children
|
||||
struct node *temp = minValueNode(root->right);
|
||||
|
||||
// Place the inorder successor in position of the node to be deleted
|
||||
root->key = temp->key;
|
||||
|
||||
// Delete the inorder successor
|
||||
root->right = deleteNode(root->right, temp->key);
|
||||
}
|
||||
return root;
|
||||
}
|
||||
|
||||
// Driver code
|
||||
int main() {
|
||||
struct node *root = NULL;
|
||||
root = insert(root, 8);
|
||||
root = insert(root, 3);
|
||||
root = insert(root, 1);
|
||||
root = insert(root, 6);
|
||||
root = insert(root, 7);
|
||||
root = insert(root, 10);
|
||||
root = insert(root, 14);
|
||||
root = insert(root, 4);
|
||||
|
||||
printf("Inorder traversal: ");
|
||||
inorder(root);
|
||||
|
||||
printf("\nAfter deleting 10\n");
|
||||
root = deleteNode(root, 10);
|
||||
printf("Inorder traversal: ");
|
||||
inorder(root);
|
||||
}
|
69
C-Doubly-Linked-List/main.c
Normal file
69
C-Doubly-Linked-List/main.c
Normal file
@ -0,0 +1,69 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
struct Node {
|
||||
int data; // The data contained in this node
|
||||
struct Node* prev; // A pointer to the previous node in the list
|
||||
struct Node* next; // A pointer to the next node in the list
|
||||
};
|
||||
|
||||
void display_traversal_forward(struct Node* node)
|
||||
{
|
||||
printf("Linked List: ");
|
||||
|
||||
// as linked list will end when Node is Null
|
||||
while( node != NULL ){
|
||||
printf("%d ",node -> data);
|
||||
node = node -> next;
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
void display_traversal_backward(struct Node* node)
|
||||
{
|
||||
printf("Linked List: ");
|
||||
|
||||
// as linked list will end when Node is Null
|
||||
while( node != NULL ){
|
||||
printf("%d ",node -> data);
|
||||
node = node -> prev;
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
int main() {
|
||||
// Creating the Nodes
|
||||
struct Node* first;
|
||||
struct Node* second;
|
||||
struct Node* third;
|
||||
struct Node* fourth;
|
||||
|
||||
first = (struct Node*)malloc(sizeof(struct Node));
|
||||
second = (struct Node*)malloc(sizeof(struct Node));
|
||||
third = (struct Node*)malloc(sizeof(struct Node));
|
||||
fourth = (struct Node*)malloc(sizeof(struct Node));
|
||||
|
||||
first -> data = 10;
|
||||
second -> data = 20;
|
||||
third -> data = 30;
|
||||
fourth -> data = 40;
|
||||
|
||||
first -> next = second;
|
||||
second -> next = third;
|
||||
third -> next = fourth;
|
||||
fourth -> next = NULL;
|
||||
|
||||
first -> prev = NULL;
|
||||
second -> prev = first;
|
||||
third -> prev = second;
|
||||
fourth -> prev = third;
|
||||
|
||||
// Traversing the nodes
|
||||
|
||||
display_traversal_forward(first);
|
||||
display_traversal_backward(fourth);
|
||||
|
||||
return 0;
|
||||
}
|
7
Java-Binary-Search/.vscode/settings.json
vendored
Normal file
7
Java-Binary-Search/.vscode/settings.json
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"java.project.sourcePaths": ["src"],
|
||||
"java.project.outputPath": "bin",
|
||||
"java.project.referencedLibraries": [
|
||||
"lib/**/*.jar"
|
||||
]
|
||||
}
|
18
Java-Binary-Search/README.md
Normal file
18
Java-Binary-Search/README.md
Normal file
@ -0,0 +1,18 @@
|
||||
## Getting Started
|
||||
|
||||
Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.
|
||||
|
||||
## Folder Structure
|
||||
|
||||
The workspace contains two folders by default, where:
|
||||
|
||||
- `src`: the folder to maintain sources
|
||||
- `lib`: the folder to maintain dependencies
|
||||
|
||||
Meanwhile, the compiled output files will be generated in the `bin` folder by default.
|
||||
|
||||
> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there.
|
||||
|
||||
## Dependency Management
|
||||
|
||||
The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies).
|
30
Java-Binary-Search/src/App.java
Normal file
30
Java-Binary-Search/src/App.java
Normal file
@ -0,0 +1,30 @@
|
||||
public class App {
|
||||
public static void main(String[] args) throws Exception {
|
||||
int[] nums = new int[8];
|
||||
nums[0] = 6;
|
||||
nums[1] = 7;
|
||||
nums[2] = 8;
|
||||
nums[3] = 12;
|
||||
nums[4] = 19;
|
||||
nums[5] = 55;
|
||||
nums[6] = 90;
|
||||
nums[7] = 98;
|
||||
|
||||
int start = 0;
|
||||
int end = nums.length;
|
||||
int mid = (start+end)/2;
|
||||
int searchItem = 7;
|
||||
while(mid < end) {
|
||||
if (nums[mid] == searchItem) {
|
||||
System.out.println("found: " + searchItem + " at index: " + mid);
|
||||
System.exit(0);
|
||||
} else if (nums[mid] > searchItem) {
|
||||
end = mid-1;
|
||||
} else {
|
||||
start = mid+1;
|
||||
}
|
||||
mid = (start+end)/2;
|
||||
}
|
||||
System.out.println("item was not found");
|
||||
}
|
||||
}
|
7
Java-Bubble-Sort/.vscode/settings.json
vendored
Normal file
7
Java-Bubble-Sort/.vscode/settings.json
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"java.project.sourcePaths": ["src"],
|
||||
"java.project.outputPath": "bin",
|
||||
"java.project.referencedLibraries": [
|
||||
"lib/**/*.jar"
|
||||
]
|
||||
}
|
18
Java-Bubble-Sort/README.md
Normal file
18
Java-Bubble-Sort/README.md
Normal file
@ -0,0 +1,18 @@
|
||||
## Getting Started
|
||||
|
||||
Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.
|
||||
|
||||
## Folder Structure
|
||||
|
||||
The workspace contains two folders by default, where:
|
||||
|
||||
- `src`: the folder to maintain sources
|
||||
- `lib`: the folder to maintain dependencies
|
||||
|
||||
Meanwhile, the compiled output files will be generated in the `bin` folder by default.
|
||||
|
||||
> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there.
|
||||
|
||||
## Dependency Management
|
||||
|
||||
The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies).
|
BIN
Java-Bubble-Sort/bin/App.class
Normal file
BIN
Java-Bubble-Sort/bin/App.class
Normal file
Binary file not shown.
33
Java-Bubble-Sort/src/App.java
Normal file
33
Java-Bubble-Sort/src/App.java
Normal file
@ -0,0 +1,33 @@
|
||||
public class App {
|
||||
public static void main(String[] args) throws Exception {
|
||||
int[] nums = new int[8];
|
||||
nums[0] = 6;
|
||||
nums[1] = 8;
|
||||
nums[2] = 7;
|
||||
nums[3] = 98;
|
||||
nums[4] = 55;
|
||||
nums[5] = 19;
|
||||
nums[6] = 90;
|
||||
nums[7] = 12;
|
||||
|
||||
for (int i = 0; i < nums.length; i++) {
|
||||
boolean swapped = false;
|
||||
for (int j = 1; j < nums.length-i-1; j++) {
|
||||
if (nums[j-1] > nums[j]) {
|
||||
int temp = nums[j];
|
||||
nums[j] = nums[j-1];
|
||||
nums[j-1] = temp;
|
||||
swapped = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (swapped) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < nums.length; i++) {
|
||||
System.out.println(nums[i]);
|
||||
}
|
||||
}
|
||||
}
|
7
Java-Insertion-Sort/.vscode/settings.json
vendored
Normal file
7
Java-Insertion-Sort/.vscode/settings.json
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"java.project.sourcePaths": ["src"],
|
||||
"java.project.outputPath": "bin",
|
||||
"java.project.referencedLibraries": [
|
||||
"lib/**/*.jar"
|
||||
]
|
||||
}
|
18
Java-Insertion-Sort/README.md
Normal file
18
Java-Insertion-Sort/README.md
Normal file
@ -0,0 +1,18 @@
|
||||
## Getting Started
|
||||
|
||||
Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.
|
||||
|
||||
## Folder Structure
|
||||
|
||||
The workspace contains two folders by default, where:
|
||||
|
||||
- `src`: the folder to maintain sources
|
||||
- `lib`: the folder to maintain dependencies
|
||||
|
||||
Meanwhile, the compiled output files will be generated in the `bin` folder by default.
|
||||
|
||||
> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there.
|
||||
|
||||
## Dependency Management
|
||||
|
||||
The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies).
|
28
Java-Insertion-Sort/src/App.java
Normal file
28
Java-Insertion-Sort/src/App.java
Normal file
@ -0,0 +1,28 @@
|
||||
/*public class App {
|
||||
public static void main(String[] args) throws Exception {
|
||||
int[] nums = new int[8];
|
||||
nums[0] = 6;
|
||||
nums[1] = 8;
|
||||
nums[2] = 7;
|
||||
nums[3] = 98;
|
||||
nums[4] = 55;
|
||||
nums[5] = 19;
|
||||
nums[6] = 90;
|
||||
nums[7] = 12;
|
||||
|
||||
for (int i = 0; i < nums.length; i++) {
|
||||
int key = nums[i];
|
||||
int j = i-1;
|
||||
while (j >= 0 && nums[j] > key) {
|
||||
nums[j+1] = nums[j];
|
||||
j--;
|
||||
}
|
||||
nums[j+1] = key;
|
||||
}
|
||||
|
||||
for (int i = 0; i < nums.length; i++) {
|
||||
System.out.println(nums[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
16
OCR-Pseudo-Code/binary_search.ps
Normal file
16
OCR-Pseudo-Code/binary_search.ps
Normal file
@ -0,0 +1,16 @@
|
||||
function binarySearch(array, searchItem) do
|
||||
start = 0
|
||||
emd = array.length-1
|
||||
mid
|
||||
|
||||
while (start <= end) do
|
||||
mid = (start + emd) / 2
|
||||
if (array[mid] > searchItem) do
|
||||
emd = mid - 1
|
||||
end else if (array[mid] < searchItem) do
|
||||
start = mid + 1
|
||||
end else do
|
||||
return "search item found at index " + mid
|
||||
end
|
||||
end
|
||||
end
|
29
OCR-Pseudo-Code/insert_sort.ps
Normal file
29
OCR-Pseudo-Code/insert_sort.ps
Normal file
@ -0,0 +1,29 @@
|
||||
// Basic
|
||||
|
||||
procedure insertSort(arr: byRef) do
|
||||
for i = 1 to arr.len - 1 do
|
||||
key = arr[i]
|
||||
j = i - 1
|
||||
while (j >= 0 AND arr[j] > key) do
|
||||
arr[j+1] = arr[j]
|
||||
j++
|
||||
end
|
||||
arr[j+1] = key
|
||||
end
|
||||
end
|
||||
|
||||
// Number of comparisons 1/2 N * (N - 1)
|
||||
|
||||
procedure insertSort(arr: byRef) do
|
||||
comparisons = 0
|
||||
for i = 1 to arr.len - 1 do
|
||||
key = arr[i]
|
||||
j = i - 1
|
||||
while (j >= 0 AND arr[j] > key) do
|
||||
arr[j+1] = arr[j]
|
||||
j++
|
||||
comparisons++
|
||||
end
|
||||
arr[j+1] = key
|
||||
end
|
||||
end
|
22
Python-Binary-Search/binarySearch.py
Normal file
22
Python-Binary-Search/binarySearch.py
Normal file
@ -0,0 +1,22 @@
|
||||
nums = [6, 7, 8, 12, 19, 55, 90, 98];
|
||||
|
||||
searchItem = 55;
|
||||
found = False;
|
||||
|
||||
start = 0;
|
||||
end = len(nums);
|
||||
mid = 0;
|
||||
|
||||
while (start <= end):
|
||||
mid = int((start + end) / 2);
|
||||
if nums[mid] == searchItem:
|
||||
print(f'found {searchItem} at index {mid}');
|
||||
found = True;
|
||||
break;
|
||||
elif nums[mid] > searchItem:
|
||||
end = mid - 1;
|
||||
else:
|
||||
start = mid + 1
|
||||
|
||||
if not found:
|
||||
print(f'{searchItem} was not found in nums');
|
18
Python-Bubble-Sort/bubbleSort.py
Normal file
18
Python-Bubble-Sort/bubbleSort.py
Normal file
@ -0,0 +1,18 @@
|
||||
nums = [8,90,19,12,7,6,55,98];
|
||||
|
||||
for i in range(len(nums)-2):
|
||||
swapped = False;
|
||||
for j in range(len(nums)-1-i):
|
||||
if j == 0:
|
||||
j = 1;
|
||||
if nums[j-1] > nums[j]:
|
||||
temp = nums[j];
|
||||
nums[j] = nums[j-1];
|
||||
nums[j-1] = temp;
|
||||
swapped = True;
|
||||
|
||||
if not swapped:
|
||||
break;
|
||||
|
||||
|
||||
print(nums);
|
12
Python-Insertion-Sort/insertionSort.py
Normal file
12
Python-Insertion-Sort/insertionSort.py
Normal file
@ -0,0 +1,12 @@
|
||||
nums = [8,90,19,12,7,6,55,98];
|
||||
|
||||
for i in range(len(nums)-1):
|
||||
key = nums[i];
|
||||
j = i-1;
|
||||
while (j >= 0 and nums[j] > key):
|
||||
nums[j+1] = nums[j];
|
||||
j -= 1;
|
||||
|
||||
nums[j+1] = key;
|
||||
|
||||
print(nums);
|
16
Python-Linear-Search/linearSearch.py
Normal file
16
Python-Linear-Search/linearSearch.py
Normal file
@ -0,0 +1,16 @@
|
||||
from re import S
|
||||
|
||||
|
||||
nums = [6, 7, 8, 12, 19, 55, 90, 98];
|
||||
searchItem = 7;
|
||||
found = False;
|
||||
|
||||
for i,j in enumerate(nums):
|
||||
if j == searchItem:
|
||||
print(f'found {searchItem} in nums at index {i}');
|
||||
found = True;
|
||||
break;
|
||||
|
||||
|
||||
if not found:
|
||||
print(f'Didn\'t find {searchItem} in nums');
|
39
Python-Merge-Sort/mergesort.py
Normal file
39
Python-Merge-Sort/mergesort.py
Normal file
@ -0,0 +1,39 @@
|
||||
def mergeSort(array):
|
||||
length = len(array)
|
||||
if length <= 1: return
|
||||
|
||||
middle = length // 2
|
||||
leftArray = array[:middle]
|
||||
rightArray = array[middle:]
|
||||
|
||||
mergeSort(leftArray)
|
||||
mergeSort(rightArray)
|
||||
merge(leftArray, rightArray, array)
|
||||
|
||||
|
||||
def merge(leftArray, rightArray, array):
|
||||
leftLength = len(leftArray)
|
||||
rightLength = len(rightArray)
|
||||
i = 0
|
||||
l = 0
|
||||
r = 0
|
||||
|
||||
while l < leftLength and r < rightLength:
|
||||
if leftArray[l] < rightArray[r]:
|
||||
array[i] = leftArray[l]
|
||||
l += 1
|
||||
else:
|
||||
array[i] = rightArray[r]
|
||||
r += 1
|
||||
|
||||
i += 1;
|
||||
|
||||
if l < leftLength:
|
||||
array[i] = leftArray[l]
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
arr = [12, 11, 5, 6, 7, 194]
|
||||
print(f'Given array is: \n{arr}');
|
||||
mergeSort(arr);
|
||||
print(f'Sorted array is: \n{arr}')
|
1
Rust-Binary-Search/.gitignore
vendored
Normal file
1
Rust-Binary-Search/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/target
|
7
Rust-Binary-Search/Cargo.lock
generated
Normal file
7
Rust-Binary-Search/Cargo.lock
generated
Normal file
@ -0,0 +1,7 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "binary_search"
|
||||
version = "0.1.0"
|
8
Rust-Binary-Search/Cargo.toml
Normal file
8
Rust-Binary-Search/Cargo.toml
Normal file
@ -0,0 +1,8 @@
|
||||
[package]
|
||||
name = "binary_search"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
18
Rust-Binary-Search/src/main.rs
Normal file
18
Rust-Binary-Search/src/main.rs
Normal file
@ -0,0 +1,18 @@
|
||||
fn main() {
|
||||
let nums: [i8; 8] = [6, 7, 8, 12, 19, 55, 90, 98];
|
||||
let mut end: usize = nums.len();
|
||||
let mut start: usize = 0;
|
||||
let search_item: i8 = 8;
|
||||
while start <= end {
|
||||
let mid = (start + end) / 2;
|
||||
if nums[mid] == search_item {
|
||||
println!("{} was found at index {}", search_item, mid);
|
||||
return;
|
||||
} else if nums[mid] > search_item {
|
||||
end = mid - 1;
|
||||
} else {
|
||||
start = mid + 1;
|
||||
}
|
||||
}
|
||||
println!("{} was not found in list", search_item);
|
||||
}
|
1
Rust-Bubble-Sort/.gitignore
vendored
Normal file
1
Rust-Bubble-Sort/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/target
|
7
Rust-Bubble-Sort/Cargo.lock
generated
Normal file
7
Rust-Bubble-Sort/Cargo.lock
generated
Normal file
@ -0,0 +1,7 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "bubble_sort"
|
||||
version = "0.1.0"
|
8
Rust-Bubble-Sort/Cargo.toml
Normal file
8
Rust-Bubble-Sort/Cargo.toml
Normal file
@ -0,0 +1,8 @@
|
||||
[package]
|
||||
name = "bubble_sort"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
26
Rust-Bubble-Sort/src/main.rs
Normal file
26
Rust-Bubble-Sort/src/main.rs
Normal file
@ -0,0 +1,26 @@
|
||||
fn main() {
|
||||
let mut nums = vec![12, 55, 8, 98, 19, 7, 90, 6];
|
||||
|
||||
println!("{nums:?}");
|
||||
nums.bubble_sort();
|
||||
println!("{nums:?}");
|
||||
}
|
||||
trait BubbleSort<T: PartialOrd> {
|
||||
fn bubble_sort(&mut self);
|
||||
}
|
||||
|
||||
impl<T: PartialOrd> BubbleSort<T> for Vec<T> {
|
||||
fn bubble_sort(&mut self) {
|
||||
for i in 0..self.len() {
|
||||
let mut swapped = false;
|
||||
for j in 1..self.len() - i {
|
||||
if self[j] < self[j-1] {
|
||||
self.swap(j, j-1);
|
||||
swapped = true;
|
||||
}
|
||||
}
|
||||
|
||||
if !swapped { return }
|
||||
}
|
||||
}
|
||||
}
|
48
Rust-Graph/Cargo.lock
generated
Normal file
48
Rust-Graph/Cargo.lock
generated
Normal file
@ -0,0 +1,48 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "Graph"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"petgraph",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "equivalent"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
|
||||
|
||||
[[package]]
|
||||
name = "fixedbitset"
|
||||
version = "0.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.14.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
|
||||
|
||||
[[package]]
|
||||
name = "indexmap"
|
||||
version = "2.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f"
|
||||
dependencies = [
|
||||
"equivalent",
|
||||
"hashbrown",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "petgraph"
|
||||
version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9"
|
||||
dependencies = [
|
||||
"fixedbitset",
|
||||
"indexmap",
|
||||
]
|
9
Rust-Graph/Cargo.toml
Normal file
9
Rust-Graph/Cargo.toml
Normal file
@ -0,0 +1,9 @@
|
||||
[package]
|
||||
name = "Graph"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
petgraph = "0.6.0"
|
84
Rust-Graph/src/main.rs
Normal file
84
Rust-Graph/src/main.rs
Normal file
@ -0,0 +1,84 @@
|
||||
use std::collections::HashSet;
|
||||
use std::fmt::Debug;
|
||||
use std::rc::Rc;
|
||||
use std::hash::Hash;
|
||||
|
||||
fn main() {
|
||||
let mut graph: Node<char> = Node { value: 'A', neighbors: vec![] };
|
||||
graph = graph.add_weighted_neighbors(vec![('C', 1), ('D', 2), ('E', 8), ('F', 3)]);
|
||||
println!("{graph:#?}");
|
||||
//graph.breadth_first_traversal();
|
||||
graph.depth_first_traversal();
|
||||
// graph.breadth_first_traversal();
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
|
||||
struct Node<T: Copy + Debug> {
|
||||
value: T,
|
||||
neighbors: Vec<Edge<T>>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
|
||||
struct Edge<T: Copy + Debug> {
|
||||
weight: u32,
|
||||
neighbor: Rc<Node<T>>,
|
||||
}
|
||||
|
||||
impl<T: Copy + Debug + Eq + Hash> Node<T> {
|
||||
pub fn add_weighted_neighbor(mut self, value: T, weight: u32) -> Self {
|
||||
let new_node = Rc::new(Node {
|
||||
value,
|
||||
neighbors: vec![Edge {
|
||||
neighbor: Rc::from(self.clone()),
|
||||
weight,
|
||||
}],
|
||||
});
|
||||
self.neighbors.push(Edge {
|
||||
neighbor: new_node.clone(),
|
||||
weight,
|
||||
});
|
||||
|
||||
self
|
||||
}
|
||||
|
||||
pub fn add_weighted_neighbors(mut self, values: Vec<(T, u32)>) -> Self {
|
||||
let mut new_nodes = vec![];
|
||||
for (value, weight) in values {
|
||||
let new_node = Rc::new(Node {
|
||||
value,
|
||||
neighbors: vec![Edge {
|
||||
neighbor: Rc::from(self.clone()),
|
||||
weight,
|
||||
}],
|
||||
});
|
||||
new_nodes.push((new_node, weight))
|
||||
}
|
||||
|
||||
for (new_node, weight) in new_nodes {
|
||||
self.neighbors.push(Edge {
|
||||
neighbor: new_node.clone(),
|
||||
weight,
|
||||
});
|
||||
}
|
||||
|
||||
self
|
||||
}
|
||||
|
||||
pub fn depth_first_traversal(&self) {
|
||||
println!("Depth First Traversal");
|
||||
let mut visited: HashSet<T> = HashSet::new();
|
||||
self.depth_first_recursive(&mut visited);
|
||||
println!("")
|
||||
}
|
||||
|
||||
fn depth_first_recursive(&self, visited: &mut HashSet<T>) {
|
||||
if !visited.contains(&self.value) {
|
||||
visited.insert(self.value);
|
||||
print!("{:?} ", self.value);
|
||||
|
||||
for edge in &self.neighbors {
|
||||
edge.neighbor.depth_first_recursive(visited);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
150
Rust-Graph/src/main.rs.2.backup
Normal file
150
Rust-Graph/src/main.rs.2.backup
Normal file
@ -0,0 +1,150 @@
|
||||
use std::cell::RefCell;
|
||||
use std::collections::{BinaryHeap, HashMap, HashSet};
|
||||
use std::cmp::Ordering;
|
||||
use std::hash::Hash;
|
||||
use std::fmt::Debug;
|
||||
use std::rc::Rc;
|
||||
|
||||
fn main() {
|
||||
let mut graph: Node<char> = Node { value: 'A', neighbors: vec![] };
|
||||
graph = graph.add_weighted_neighbors(vec![('C', 1), ('D', 2), ('E', 8), ('F', 3)]);
|
||||
(*Rc::clone(&graph.neighbors[0].neighbor)).borrow_mut().add_weighted_neighbor('G', 4);
|
||||
println!("{graph:#?}");
|
||||
|
||||
// Dijkstra's Algorithm
|
||||
let start_node = 'A';
|
||||
let distances = Node::dijkstra(&graph, start_node);
|
||||
|
||||
println!("Shortest distances from {}: {:?}", start_node, distances);
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
struct Node<T: Copy + Debug> {
|
||||
value: T,
|
||||
neighbors: Vec<Edge<T>>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
struct Edge<T: Copy + Debug> {
|
||||
weight: u32,
|
||||
neighbor: Rc<RefCell<Node<T>>>,
|
||||
}
|
||||
|
||||
impl<T: Copy + Debug + Eq + Hash> Node<T> {
|
||||
pub fn add_weighted_neighbor(&mut self, value: T, weight: u32) {
|
||||
let new_node = Rc::new(RefCell::new(Node {
|
||||
value,
|
||||
neighbors: vec![Edge {
|
||||
neighbor: Rc::from(RefCell::from(self.clone())),
|
||||
weight,
|
||||
}],
|
||||
}));
|
||||
|
||||
self.neighbors.push(Edge {
|
||||
neighbor: new_node.clone(),
|
||||
weight,
|
||||
});
|
||||
}
|
||||
|
||||
pub fn add_weighted_neighbors(mut self, values: Vec<(T, u32)>) -> Self {
|
||||
let mut new_nodes = vec![];
|
||||
for (value, weight) in values {
|
||||
let new_node = Rc::new(RefCell::new(Node {
|
||||
value,
|
||||
neighbors: vec![Edge {
|
||||
neighbor: Rc::from(RefCell::from(self.clone())),
|
||||
weight,
|
||||
}],
|
||||
}));
|
||||
new_nodes.push((new_node, weight))
|
||||
}
|
||||
|
||||
for (new_node, weight) in new_nodes {
|
||||
self.neighbors.push(Edge {
|
||||
neighbor: new_node.clone(),
|
||||
weight,
|
||||
});
|
||||
}
|
||||
|
||||
self
|
||||
}
|
||||
|
||||
pub fn depth_first_traversal(&self) {
|
||||
println!("Depth First Traversal");
|
||||
let mut visited: HashSet<T> = HashSet::new();
|
||||
self.depth_first_recursive(&mut visited);
|
||||
println!("")
|
||||
}
|
||||
|
||||
fn depth_first_recursive(&self, visited: &mut HashSet<T>) {
|
||||
if !visited.contains(&self.borrow().value) {
|
||||
visited.insert(self.borrow().value);
|
||||
print!("{:?} ", self.borrow().value);
|
||||
|
||||
for edge in &self.borrow().neighbors {
|
||||
edge.neighbor.borrow().depth_first_recursive(visited);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pub fn dijkstra(&self, start: T) -> HashMap<T, u32> {
|
||||
let mut distances: HashMap<T, u32> = HashMap::new();
|
||||
let mut priority_queue = BinaryHeap::new();
|
||||
|
||||
distances.insert(start, 0);
|
||||
priority_queue.push(DijkstraNode {
|
||||
value: start,
|
||||
distance: 0,
|
||||
});
|
||||
|
||||
while let Some(DijkstraNode { value, distance }) = priority_queue.pop() {
|
||||
if let Some(current_distance) = distances.get(&value) {
|
||||
if distance > *current_distance {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
for edge in &self.neighbors {
|
||||
let neighbor_value = edge.neighbor.value;
|
||||
let new_distance = distance + edge.weight;
|
||||
|
||||
if let Some(current_distance) = distances.get(&neighbor_value) {
|
||||
if new_distance < *current_distance {
|
||||
distances.insert(neighbor_value, new_distance);
|
||||
priority_queue.push(DijkstraNode {
|
||||
value: neighbor_value,
|
||||
distance: new_distance,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
distances.insert(neighbor_value, new_distance);
|
||||
priority_queue.push(DijkstraNode {
|
||||
value: neighbor_value,
|
||||
distance: new_distance,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
distances
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
struct DijkstraNode<T> {
|
||||
value: T,
|
||||
distance: u32,
|
||||
}
|
||||
|
||||
impl<T: Eq> Ord for DijkstraNode<T> {
|
||||
fn cmp(&self, other: &Self) -> Ordering {
|
||||
other.distance.cmp(&self.distance)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Eq> PartialOrd for DijkstraNode<T> {
|
||||
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
|
||||
Some(self.cmp(other))
|
||||
}
|
||||
}
|
1
Rust-Graph/target/.rustc_info.json
Normal file
1
Rust-Graph/target/.rustc_info.json
Normal file
@ -0,0 +1 @@
|
||||
{"rustc_fingerprint":14650900074607685087,"outputs":{"15729799797837862367":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/Users/arlo/.rustup/toolchains/stable-aarch64-apple-darwin\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"aarch64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"aes\"\ntarget_feature=\"crc\"\ntarget_feature=\"dit\"\ntarget_feature=\"dotprod\"\ntarget_feature=\"dpb\"\ntarget_feature=\"dpb2\"\ntarget_feature=\"fcma\"\ntarget_feature=\"fhm\"\ntarget_feature=\"flagm\"\ntarget_feature=\"fp16\"\ntarget_feature=\"frintts\"\ntarget_feature=\"jsconv\"\ntarget_feature=\"lor\"\ntarget_feature=\"lse\"\ntarget_feature=\"neon\"\ntarget_feature=\"paca\"\ntarget_feature=\"pacg\"\ntarget_feature=\"pan\"\ntarget_feature=\"pmuv3\"\ntarget_feature=\"ras\"\ntarget_feature=\"rcpc\"\ntarget_feature=\"rcpc2\"\ntarget_feature=\"rdm\"\ntarget_feature=\"sb\"\ntarget_feature=\"sha2\"\ntarget_feature=\"sha3\"\ntarget_feature=\"ssbs\"\ntarget_feature=\"vh\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"apple\"\nunix\n","stderr":""},"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.77.0 (aedd173a2 2024-03-17)\nbinary: rustc\ncommit-hash: aedd173a2c086e558c2b66d3743b344f977621a7\ncommit-date: 2024-03-17\nhost: aarch64-apple-darwin\nrelease: 1.77.0\nLLVM version: 17.0.6\n","stderr":""}},"successes":{}}
|
3
Rust-Graph/target/CACHEDIR.TAG
Normal file
3
Rust-Graph/target/CACHEDIR.TAG
Normal file
@ -0,0 +1,3 @@
|
||||
Signature: 8a477f597d28d172789f06886806bc55
|
||||
# This file is a cache directory tag created by cargo.
|
||||
# For information about cache directory tags see https://bford.info/cachedir/
|
0
Rust-Graph/target/debug/.cargo-lock
Normal file
0
Rust-Graph/target/debug/.cargo-lock
Normal file
@ -0,0 +1 @@
|
||||
b438e603f3acc75d
|
@ -0,0 +1 @@
|
||||
{"rustc":18172388912415379536,"features":"[]","target":16820067710251004091,"profile":13396965805329499462,"path":1684066648322511884,"deps":[[15163368944212380208,"queues",false,7420410082420598839]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/Graph-24f5ba2ff047fd65/dep-bin-Graph"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
@ -0,0 +1,5 @@
|
||||
{"message":"method `add_neighbor` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":347,"byte_end":376,"line_start":19,"line_end":19,"column_start":1,"column_end":30,"is_primary":false,"text":[{"text":"impl<T: Copy + Debug> Node<T> {","highlight_start":1,"highlight_end":30}],"label":"method in this implementation","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":390,"byte_end":402,"line_start":20,"line_end":20,"column_start":12,"column_end":24,"is_primary":true,"text":[{"text":" pub fn add_neighbor(&mut self, value: T) {","highlight_start":12,"highlight_end":24}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: method `add_neighbor` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:20:12\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m19\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mimpl<T: Copy + Debug> Node<T> {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-----------------------------\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mmethod in this implementation\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m20\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m pub fn add_neighbor(&mut self, value: T) {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"}
|
||||
{"message":"crate `Graph` should have a snake case name","code":{"code":"non_snake_case","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":true,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"convert the identifier to snake case: `graph`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"`#[warn(non_snake_case)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: crate `Graph` should have a snake case name\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mhelp\u001b[0m\u001b[0m: convert the identifier to snake case: `graph`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(non_snake_case)]` on by default\u001b[0m\n\n"}
|
||||
{"message":"variable `newNode` should have a snake case name","code":{"code":"non_snake_case","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":442,"byte_end":449,"line_start":21,"line_end":21,"column_start":17,"column_end":24,"is_primary":true,"text":[{"text":" let mut newNode = Node { value, neighbors: vec![self] };","highlight_start":17,"highlight_end":24}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"convert the identifier to snake case","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":442,"byte_end":449,"line_start":21,"line_end":21,"column_start":17,"column_end":24,"is_primary":true,"text":[{"text":" let mut newNode = Node { value, neighbors: vec![self] };","highlight_start":17,"highlight_end":24}],"label":null,"suggested_replacement":"new_node","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: variable `newNode` should have a snake case name\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:21:17\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m21\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let mut newNode = Node { value, neighbors: vec![self] };\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33mhelp: convert the identifier to snake case: `new_node`\u001b[0m\n\n"}
|
||||
{"message":"variable `newNode` should have a snake case name","code":{"code":"non_snake_case","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":658,"byte_end":665,"line_start":27,"line_end":27,"column_start":21,"column_end":28,"is_primary":true,"text":[{"text":" let mut newNode = Node { value, neighbors: vec![self] };","highlight_start":21,"highlight_end":28}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"convert the identifier to snake case","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":658,"byte_end":665,"line_start":27,"line_end":27,"column_start":21,"column_end":28,"is_primary":true,"text":[{"text":" let mut newNode = Node { value, neighbors: vec![self] };","highlight_start":21,"highlight_end":28}],"label":null,"suggested_replacement":"new_node","suggestion_applicability":"MaybeIncorrect","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: variable `newNode` should have a snake case name\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:27:21\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m27\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let mut newNode = Node { value, neighbors: vec![self] };\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33mhelp: convert the identifier to snake case: `new_node`\u001b[0m\n\n"}
|
||||
{"message":"4 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 4 warnings emitted\u001b[0m\n\n"}
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
@ -0,0 +1,3 @@
|
||||
{"message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type.\n\nErroneous code examples:\n\n```compile_fail,E0308\nfn plus_one(x: i32) -> i32 {\n x + 1\n}\n\nplus_one(\"Not a number\");\n// ^^^^^^^^^^^^^^ expected `i32`, found `&str`\n\nif \"Not a bool\" {\n// ^^^^^^^^^^^^ expected `bool`, found `&str`\n}\n\nlet x: f32 = \"Not a float\";\n// --- ^^^^^^^^^^^^^ expected `f32`, found `&str`\n// |\n// expected due to this\n```\n\nThis error occurs when an expression was used in a place where the compiler\nexpected an expression of a different type. It can occur in several cases, the\nmost common being when calling a function and passing an argument which has a\ndifferent type than the matching type in the function declaration.\n"},"level":"error","spans":[{"file_name":"src/main.rs","byte_start":593,"byte_end":647,"line_start":26,"line_end":26,"column_start":9,"column_end":63,"is_primary":true,"text":[{"text":" String::from(\"you're doing a breadth first traversal\")","highlight_start":9,"highlight_end":63}],"label":"expected `Vec<T>`, found `String`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":575,"byte_end":581,"line_start":24,"line_end":24,"column_start":46,"column_end":52,"is_primary":false,"text":[{"text":" pub fn breadth_first_traversal(&self) -> Vec<T> {","highlight_start":46,"highlight_end":52}],"label":"expected `Vec<T>` because of return type","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected struct `Vec<T>`\n found struct `String`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0308]\u001b[0m\u001b[0m\u001b[1m: mismatched types\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:26:9\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m24\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m pub fn breadth_first_traversal(&self) -> Vec<T> {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m------\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mexpected `Vec<T>` because of return type\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m25\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m26\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m String::from(\"you're doing a breadth first traversal\")\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mexpected `Vec<T>`, found `String`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: expected struct `\u001b[0m\u001b[0m\u001b[1mVec<T>\u001b[0m\u001b[0m`\u001b[0m\n\u001b[0m found struct `\u001b[0m\u001b[0m\u001b[1mString\u001b[0m\u001b[0m`\u001b[0m\n\n"}
|
||||
{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: aborting due to previous error\u001b[0m\n\n"}
|
||||
{"message":"For more information about this error, try `rustc --explain E0308`.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1mFor more information about this error, try `rustc --explain E0308`.\u001b[0m\n"}
|
@ -0,0 +1 @@
|
||||
{"rustc":18172388912415379536,"features":"[]","target":16820067710251004091,"profile":13053956386274884697,"path":1684066648322511884,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/Graph-27a3f01e3b89ef4b/dep-test-bin-Graph"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
@ -0,0 +1,3 @@
|
||||
{"$message_type":"diagnostic","message":"method `add_weighted_neighbor` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":653,"byte_end":694,"line_start":27,"line_end":27,"column_start":1,"column_end":42,"is_primary":false,"text":[{"text":"impl<T: Copy + Debug + Eq + Hash> Node<T> {","highlight_start":1,"highlight_end":42}],"label":"method in this implementation","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":708,"byte_end":729,"line_start":28,"line_end":28,"column_start":12,"column_end":33,"is_primary":true,"text":[{"text":" pub fn add_weighted_neighbor(mut self, value: T, weight: u32) -> Self {","highlight_start":12,"highlight_end":33}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: method `add_weighted_neighbor` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:28:12\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m27\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mimpl<T: Copy + Debug + Eq + Hash> Node<T> {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-----------------------------------------\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mmethod in this implementation\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m28\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m pub fn add_weighted_neighbor(mut self, value: T, weight: u32) -> Self {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"}
|
||||
{"$message_type":"diagnostic","message":"crate `Graph` should have a snake case name","code":{"code":"non_snake_case","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":true,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"convert the identifier to snake case: `graph`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"`#[warn(non_snake_case)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: crate `Graph` should have a snake case name\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mhelp\u001b[0m\u001b[0m: convert the identifier to snake case: `graph`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(non_snake_case)]` on by default\u001b[0m\n\n"}
|
||||
{"$message_type":"diagnostic","message":"2 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 2 warnings emitted\u001b[0m\n\n"}
|
@ -0,0 +1 @@
|
||||
7727af298d4c072c
|
@ -0,0 +1 @@
|
||||
{"rustc":1266641762605002455,"features":"[]","declared_features":"","target":16820067710251004091,"profile":13957322908208868000,"path":1684066648322511884,"deps":[[3495746749668592279,"petgraph",false,8839461772953967174]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/Graph-2ec7b4adf898ca0d/dep-test-bin-Graph"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
|
@ -0,0 +1 @@
|
||||
9a01796a05f9352f
|
@ -0,0 +1 @@
|
||||
{"rustc":6751658808475272799,"features":"[]","declared_features":"","target":16820067710251004091,"profile":14400670141151969058,"path":1684066648322511884,"deps":[[3495746749668592279,"petgraph",false,15240822703874256125]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/Graph-3c4baf14a98df0f9/dep-bin-Graph"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
@ -0,0 +1,3 @@
|
||||
{"$message_type":"diagnostic","message":"method `add_weighted_neighbor` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":653,"byte_end":694,"line_start":27,"line_end":27,"column_start":1,"column_end":42,"is_primary":false,"text":[{"text":"impl<T: Copy + Debug + Eq + Hash> Node<T> {","highlight_start":1,"highlight_end":42}],"label":"method in this implementation","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":708,"byte_end":729,"line_start":28,"line_end":28,"column_start":12,"column_end":33,"is_primary":true,"text":[{"text":" pub fn add_weighted_neighbor(mut self, value: T, weight: u32) -> Self {","highlight_start":12,"highlight_end":33}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: method `add_weighted_neighbor` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:28:12\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m27\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mimpl<T: Copy + Debug + Eq + Hash> Node<T> {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-----------------------------------------\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mmethod in this implementation\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m28\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m pub fn add_weighted_neighbor(mut self, value: T, weight: u32) -> Self {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"}
|
||||
{"$message_type":"diagnostic","message":"crate `Graph` should have a snake case name","code":{"code":"non_snake_case","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":true,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"convert the identifier to snake case: `graph`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"`#[warn(non_snake_case)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: crate `Graph` should have a snake case name\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mhelp\u001b[0m\u001b[0m: convert the identifier to snake case: `graph`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(non_snake_case)]` on by default\u001b[0m\n\n"}
|
||||
{"$message_type":"diagnostic","message":"2 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 2 warnings emitted\u001b[0m\n\n"}
|
@ -0,0 +1 @@
|
||||
e5f708a41e0f5379
|
@ -0,0 +1 @@
|
||||
{"rustc":1266641762605002455,"features":"[]","declared_features":"","target":16820067710251004091,"profile":14400670141151969058,"path":1684066648322511884,"deps":[[3495746749668592279,"petgraph",false,8839461772953967174]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/Graph-3e8a98454f63ef39/dep-bin-Graph"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
@ -0,0 +1,3 @@
|
||||
{"$message_type":"diagnostic","message":"method `add_weighted_neighbor` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":653,"byte_end":694,"line_start":27,"line_end":27,"column_start":1,"column_end":42,"is_primary":false,"text":[{"text":"impl<T: Copy + Debug + Eq + Hash> Node<T> {","highlight_start":1,"highlight_end":42}],"label":"method in this implementation","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":708,"byte_end":729,"line_start":28,"line_end":28,"column_start":12,"column_end":33,"is_primary":true,"text":[{"text":" pub fn add_weighted_neighbor(mut self, value: T, weight: u32) -> Self {","highlight_start":12,"highlight_end":33}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: method `add_weighted_neighbor` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:28:12\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m27\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mimpl<T: Copy + Debug + Eq + Hash> Node<T> {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-----------------------------------------\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mmethod in this implementation\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m28\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m pub fn add_weighted_neighbor(mut self, value: T, weight: u32) -> Self {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"}
|
||||
{"$message_type":"diagnostic","message":"crate `Graph` should have a snake case name","code":{"code":"non_snake_case","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":true,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"convert the identifier to snake case: `graph`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"`#[warn(non_snake_case)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: crate `Graph` should have a snake case name\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mhelp\u001b[0m\u001b[0m: convert the identifier to snake case: `graph`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(non_snake_case)]` on by default\u001b[0m\n\n"}
|
||||
{"$message_type":"diagnostic","message":"2 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 2 warnings emitted\u001b[0m\n\n"}
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
@ -0,0 +1,4 @@
|
||||
{"$message_type":"diagnostic","message":"unused import: `queues::*`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":116,"byte_end":125,"line_start":7,"line_end":7,"column_start":5,"column_end":14,"is_primary":true,"text":[{"text":"use queues::*;","highlight_start":5,"highlight_end":14}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":112,"byte_end":126,"line_start":7,"line_end":7,"column_start":1,"column_end":15,"is_primary":true,"text":[{"text":"use queues::*;","highlight_start":1,"highlight_end":15}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused import: `queues::*`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:7:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m7\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0muse queues::*;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_imports)]` on by default\u001b[0m\n\n"}
|
||||
{"$message_type":"diagnostic","message":"method `add_weighted_neighbor` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":690,"byte_end":731,"line_start":30,"line_end":30,"column_start":1,"column_end":42,"is_primary":false,"text":[{"text":"impl<T: Copy + Debug + Eq + Hash> Node<T> {","highlight_start":1,"highlight_end":42}],"label":"method in this implementation","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":745,"byte_end":766,"line_start":31,"line_end":31,"column_start":12,"column_end":33,"is_primary":true,"text":[{"text":" pub fn add_weighted_neighbor(mut self, value: T, weight: u32) -> Self {","highlight_start":12,"highlight_end":33}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: method `add_weighted_neighbor` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:31:12\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m30\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mimpl<T: Copy + Debug + Eq + Hash> Node<T> {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-----------------------------------------\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mmethod in this implementation\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m31\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m pub fn add_weighted_neighbor(mut self, value: T, weight: u32) -> Self {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"}
|
||||
{"$message_type":"diagnostic","message":"crate `Graph` should have a snake case name","code":{"code":"non_snake_case","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":true,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"convert the identifier to snake case: `graph`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"`#[warn(non_snake_case)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: crate `Graph` should have a snake case name\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mhelp\u001b[0m\u001b[0m: convert the identifier to snake case: `graph`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(non_snake_case)]` on by default\u001b[0m\n\n"}
|
||||
{"$message_type":"diagnostic","message":"3 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 3 warnings emitted\u001b[0m\n\n"}
|
@ -0,0 +1 @@
|
||||
9be58c3a060ba8a5
|
@ -0,0 +1 @@
|
||||
{"rustc":6751658808475272799,"features":"[]","declared_features":"","target":16820067710251004091,"profile":13957322908208868000,"path":1684066648322511884,"deps":[[15163368944212380208,"queues",false,921593257783883207]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/Graph-4968b22f2f18f51a/dep-test-bin-Graph"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
|
@ -0,0 +1 @@
|
||||
{"rustc":18172388912415379536,"features":"[]","target":16820067710251004091,"profile":13396965805329499462,"path":1684066648322511884,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/Graph-502f29eb052bf5dd/dep-bin-Graph"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
@ -0,0 +1,3 @@
|
||||
{"message":"mismatched types","code":{"code":"E0308","explanation":"Expected type did not match the received type.\n\nErroneous code examples:\n\n```compile_fail,E0308\nfn plus_one(x: i32) -> i32 {\n x + 1\n}\n\nplus_one(\"Not a number\");\n// ^^^^^^^^^^^^^^ expected `i32`, found `&str`\n\nif \"Not a bool\" {\n// ^^^^^^^^^^^^ expected `bool`, found `&str`\n}\n\nlet x: f32 = \"Not a float\";\n// --- ^^^^^^^^^^^^^ expected `f32`, found `&str`\n// |\n// expected due to this\n```\n\nThis error occurs when an expression was used in a place where the compiler\nexpected an expression of a different type. It can occur in several cases, the\nmost common being when calling a function and passing an argument which has a\ndifferent type than the matching type in the function declaration.\n"},"level":"error","spans":[{"file_name":"src/main.rs","byte_start":593,"byte_end":647,"line_start":26,"line_end":26,"column_start":9,"column_end":63,"is_primary":true,"text":[{"text":" String::from(\"you're doing a breadth first traversal\")","highlight_start":9,"highlight_end":63}],"label":"expected `Vec<T>`, found `String`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":575,"byte_end":581,"line_start":24,"line_end":24,"column_start":46,"column_end":52,"is_primary":false,"text":[{"text":" pub fn breadth_first_traversal(&self) -> Vec<T> {","highlight_start":46,"highlight_end":52}],"label":"expected `Vec<T>` because of return type","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected struct `Vec<T>`\n found struct `String`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0308]\u001b[0m\u001b[0m\u001b[1m: mismatched types\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:26:9\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m24\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m pub fn breadth_first_traversal(&self) -> Vec<T> {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m------\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mexpected `Vec<T>` because of return type\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m25\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m26\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m String::from(\"you're doing a breadth first traversal\")\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mexpected `Vec<T>`, found `String`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: expected struct `\u001b[0m\u001b[0m\u001b[1mVec<T>\u001b[0m\u001b[0m`\u001b[0m\n\u001b[0m found struct `\u001b[0m\u001b[0m\u001b[1mString\u001b[0m\u001b[0m`\u001b[0m\n\n"}
|
||||
{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: aborting due to previous error\u001b[0m\n\n"}
|
||||
{"message":"For more information about this error, try `rustc --explain E0308`.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1mFor more information about this error, try `rustc --explain E0308`.\u001b[0m\n"}
|
@ -0,0 +1 @@
|
||||
{"rustc":6751658808475272799,"features":"[]","declared_features":"","target":16820067710251004091,"profile":14453530908159220714,"path":1684066648322511884,"deps":[[3495746749668592279,"petgraph",false,15148762967589470593]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/Graph-5df2cbd3a0be6ef6/dep-bin-Graph"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
@ -0,0 +1,5 @@
|
||||
{"$message_type":"diagnostic","message":"no method named `depth_first_recursive` found for struct `Rc<RefCell<Node<T>>>` in the current scope","code":{"code":"E0599","explanation":"This error occurs when a method is used on a type which doesn't implement it:\n\nErroneous code example:\n\n```compile_fail,E0599\nstruct Mouth;\n\nlet x = Mouth;\nx.chocolate(); // error: no method named `chocolate` found for type `Mouth`\n // in the current scope\n```\n\nIn this case, you need to implement the `chocolate` method to fix the error:\n\n```\nstruct Mouth;\n\nimpl Mouth {\n fn chocolate(&self) { // We implement the `chocolate` method here.\n println!(\"Hmmm! I love chocolate!\");\n }\n}\n\nlet x = Mouth;\nx.chocolate(); // ok!\n```\n"},"level":"error","spans":[{"file_name":"src/main.rs","byte_start":2475,"byte_end":2496,"line_start":85,"line_end":85,"column_start":31,"column_end":52,"is_primary":true,"text":[{"text":" edge.neighbor.depth_first_recursive(visited);","highlight_start":31,"highlight_end":52}],"label":"method not found in `Rc<RefCell<Node<T>>>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0599]\u001b[0m\u001b[0m\u001b[1m: no method named `depth_first_recursive` found for struct `Rc<RefCell<Node<T>>>` in the current scope\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:85:31\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m85\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m edge.neighbor.depth_first_recursive(visited);\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mmethod not found in `Rc<RefCell<Node<T>>>`\u001b[0m\n\n"}
|
||||
{"$message_type":"diagnostic","message":"field `value` of struct `RefCell` is private","code":{"code":"E0616","explanation":"Attempted to access a private field on a struct.\n\nErroneous code example:\n\n```compile_fail,E0616\nmod some_module {\n pub struct Foo {\n x: u32, // So `x` is private in here.\n }\n\n impl Foo {\n pub fn new() -> Foo { Foo { x: 0 } }\n }\n}\n\nlet f = some_module::Foo::new();\nprintln!(\"{}\", f.x); // error: field `x` of struct `some_module::Foo` is private\n```\n\nIf you want to access this field, you have two options:\n\n1) Set the field public:\n\n```\nmod some_module {\n pub struct Foo {\n pub x: u32, // `x` is now public.\n }\n\n impl Foo {\n pub fn new() -> Foo { Foo { x: 0 } }\n }\n}\n\nlet f = some_module::Foo::new();\nprintln!(\"{}\", f.x); // ok!\n```\n\n2) Add a getter function:\n\n```\nmod some_module {\n pub struct Foo {\n x: u32, // So `x` is still private in here.\n }\n\n impl Foo {\n pub fn new() -> Foo { Foo { x: 0 } }\n\n // We create the getter function here:\n pub fn get_x(&self) -> &u32 { &self.x }\n }\n}\n\nlet f = some_module::Foo::new();\nprintln!(\"{}\", f.get_x()); // ok!\n```\n"},"level":"error","spans":[{"file_name":"src/main.rs","byte_start":3209,"byte_end":3214,"line_start":108,"line_end":108,"column_start":52,"column_end":57,"is_primary":true,"text":[{"text":" let neighbor_value = edge.neighbor.value;","highlight_start":52,"highlight_end":57}],"label":"private field","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0616]\u001b[0m\u001b[0m\u001b[1m: field `value` of struct `RefCell` is private\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:108:52\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m108\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let neighbor_value = edge.neighbor.value;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mprivate field\u001b[0m\n\n"}
|
||||
{"$message_type":"diagnostic","message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: aborting due to 2 previous errors\u001b[0m\n\n"}
|
||||
{"$message_type":"diagnostic","message":"Some errors have detailed explanations: E0599, E0616.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1mSome errors have detailed explanations: E0599, E0616.\u001b[0m\n"}
|
||||
{"$message_type":"diagnostic","message":"For more information about an error, try `rustc --explain E0599`.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1mFor more information about an error, try `rustc --explain E0599`.\u001b[0m\n"}
|
@ -0,0 +1 @@
|
||||
bcbd5c58fc7f10f4
|
@ -0,0 +1 @@
|
||||
{"rustc":6751658808475272799,"features":"[]","declared_features":"","target":16820067710251004091,"profile":14400670141151969058,"path":1684066648322511884,"deps":[[3495746749668592279,"petgraph",false,15240822703874256125],[15163368944212380208,"queues",false,921593257783883207]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/Graph-645c762c8c009e07/dep-bin-Graph"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
@ -0,0 +1,3 @@
|
||||
{"$message_type":"diagnostic","message":"method `add_weighted_neighbor` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":653,"byte_end":694,"line_start":27,"line_end":27,"column_start":1,"column_end":42,"is_primary":false,"text":[{"text":"impl<T: Copy + Debug + Eq + Hash> Node<T> {","highlight_start":1,"highlight_end":42}],"label":"method in this implementation","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":708,"byte_end":729,"line_start":28,"line_end":28,"column_start":12,"column_end":33,"is_primary":true,"text":[{"text":" pub fn add_weighted_neighbor(mut self, value: T, weight: u32) -> Self {","highlight_start":12,"highlight_end":33}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: method `add_weighted_neighbor` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:28:12\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m27\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mimpl<T: Copy + Debug + Eq + Hash> Node<T> {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-----------------------------------------\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mmethod in this implementation\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m28\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m pub fn add_weighted_neighbor(mut self, value: T, weight: u32) -> Self {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"}
|
||||
{"$message_type":"diagnostic","message":"crate `Graph` should have a snake case name","code":{"code":"non_snake_case","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":true,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"convert the identifier to snake case: `graph`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"`#[warn(non_snake_case)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: crate `Graph` should have a snake case name\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mhelp\u001b[0m\u001b[0m: convert the identifier to snake case: `graph`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(non_snake_case)]` on by default\u001b[0m\n\n"}
|
||||
{"$message_type":"diagnostic","message":"2 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 2 warnings emitted\u001b[0m\n\n"}
|
@ -0,0 +1 @@
|
||||
db81e92751dd8336
|
@ -0,0 +1 @@
|
||||
{"rustc":18172388912415379536,"features":"[]","target":16820067710251004091,"profile":237655285757591511,"path":1684066648322511884,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/Graph-680dc754058e76e5/dep-bin-Graph"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
@ -0,0 +1,4 @@
|
||||
{"message":"field `value` is never read","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":147,"byte_end":151,"line_start":8,"line_end":8,"column_start":8,"column_end":12,"is_primary":false,"text":[{"text":"struct Node<T> {","highlight_start":8,"highlight_end":12}],"label":"field in this struct","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":161,"byte_end":166,"line_start":9,"line_end":9,"column_start":5,"column_end":10,"is_primary":true,"text":[{"text":" value: T,","highlight_start":5,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: field `value` is never read\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:9:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m8\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mstruct Node<T> {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m----\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mfield in this struct\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m9\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m value: T,\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"}
|
||||
{"message":"method `add_neighbor` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":202,"byte_end":217,"line_start":13,"line_end":13,"column_start":1,"column_end":16,"is_primary":false,"text":[{"text":"impl<T> Node<T> {","highlight_start":1,"highlight_end":16}],"label":"method in this implementation","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":231,"byte_end":243,"line_start":14,"line_end":14,"column_start":12,"column_end":24,"is_primary":true,"text":[{"text":" pub fn add_neighbor(&mut self, value: T) {","highlight_start":12,"highlight_end":24}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: method `add_neighbor` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:14:12\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m13\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mimpl<T> Node<T> {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m---------------\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mmethod in this implementation\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m14\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m pub fn add_neighbor(&mut self, value: T) {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^\u001b[0m\n\n"}
|
||||
{"message":"crate `Graph` should have a snake case name","code":{"code":"non_snake_case","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":true,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"convert the identifier to snake case: `graph`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"`#[warn(non_snake_case)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: crate `Graph` should have a snake case name\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mhelp\u001b[0m\u001b[0m: convert the identifier to snake case: `graph`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(non_snake_case)]` on by default\u001b[0m\n\n"}
|
||||
{"message":"3 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 3 warnings emitted\u001b[0m\n\n"}
|
@ -0,0 +1 @@
|
||||
92c8816c01fa19ad
|
@ -0,0 +1 @@
|
||||
{"rustc":6751658808475272799,"features":"[]","declared_features":"","target":16820067710251004091,"profile":14400670141151969058,"path":1684066648322511884,"deps":[[15163368944212380208,"queues",false,921593257783883207]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/Graph-a348dbd254da4eae/dep-bin-Graph"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
@ -0,0 +1,4 @@
|
||||
{"$message_type":"diagnostic","message":"unused import: `queues::*`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":116,"byte_end":125,"line_start":7,"line_end":7,"column_start":5,"column_end":14,"is_primary":true,"text":[{"text":"use queues::*;","highlight_start":5,"highlight_end":14}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":112,"byte_end":126,"line_start":7,"line_end":7,"column_start":1,"column_end":15,"is_primary":true,"text":[{"text":"use queues::*;","highlight_start":1,"highlight_end":15}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused import: `queues::*`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:7:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m7\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0muse queues::*;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_imports)]` on by default\u001b[0m\n\n"}
|
||||
{"$message_type":"diagnostic","message":"method `add_weighted_neighbor` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":690,"byte_end":731,"line_start":30,"line_end":30,"column_start":1,"column_end":42,"is_primary":false,"text":[{"text":"impl<T: Copy + Debug + Eq + Hash> Node<T> {","highlight_start":1,"highlight_end":42}],"label":"method in this implementation","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":745,"byte_end":766,"line_start":31,"line_end":31,"column_start":12,"column_end":33,"is_primary":true,"text":[{"text":" pub fn add_weighted_neighbor(mut self, value: T, weight: u32) -> Self {","highlight_start":12,"highlight_end":33}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: method `add_weighted_neighbor` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:31:12\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m30\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mimpl<T: Copy + Debug + Eq + Hash> Node<T> {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-----------------------------------------\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mmethod in this implementation\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m31\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m pub fn add_weighted_neighbor(mut self, value: T, weight: u32) -> Self {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"}
|
||||
{"$message_type":"diagnostic","message":"crate `Graph` should have a snake case name","code":{"code":"non_snake_case","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":true,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"convert the identifier to snake case: `graph`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"`#[warn(non_snake_case)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: crate `Graph` should have a snake case name\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mhelp\u001b[0m\u001b[0m: convert the identifier to snake case: `graph`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(non_snake_case)]` on by default\u001b[0m\n\n"}
|
||||
{"$message_type":"diagnostic","message":"3 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 3 warnings emitted\u001b[0m\n\n"}
|
@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
@ -0,0 +1,3 @@
|
||||
{"$message_type":"diagnostic","message":"method `add_weighted_neighbor` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":653,"byte_end":694,"line_start":27,"line_end":27,"column_start":1,"column_end":42,"is_primary":false,"text":[{"text":"impl<T: Copy + Debug + Eq + Hash> Node<T> {","highlight_start":1,"highlight_end":42}],"label":"method in this implementation","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":708,"byte_end":729,"line_start":28,"line_end":28,"column_start":12,"column_end":33,"is_primary":true,"text":[{"text":" pub fn add_weighted_neighbor(mut self, value: T, weight: u32) -> Self {","highlight_start":12,"highlight_end":33}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: method `add_weighted_neighbor` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:28:12\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m27\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mimpl<T: Copy + Debug + Eq + Hash> Node<T> {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-----------------------------------------\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mmethod in this implementation\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m28\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m pub fn add_weighted_neighbor(mut self, value: T, weight: u32) -> Self {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"}
|
||||
{"$message_type":"diagnostic","message":"crate `Graph` should have a snake case name","code":{"code":"non_snake_case","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":true,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"convert the identifier to snake case: `graph`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"`#[warn(non_snake_case)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: crate `Graph` should have a snake case name\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mhelp\u001b[0m\u001b[0m: convert the identifier to snake case: `graph`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(non_snake_case)]` on by default\u001b[0m\n\n"}
|
||||
{"$message_type":"diagnostic","message":"2 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 2 warnings emitted\u001b[0m\n\n"}
|
@ -0,0 +1 @@
|
||||
179a048915b6c1da
|
@ -0,0 +1 @@
|
||||
{"rustc":6751658808475272799,"features":"[]","declared_features":"","target":16820067710251004091,"profile":13957322908208868000,"path":1684066648322511884,"deps":[[3495746749668592279,"petgraph",false,15240822703874256125]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/Graph-aa0b2870b9747949/dep-test-bin-Graph"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
@ -0,0 +1,3 @@
|
||||
{"$message_type":"diagnostic","message":"method `add_weighted_neighbor` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":653,"byte_end":694,"line_start":27,"line_end":27,"column_start":1,"column_end":42,"is_primary":false,"text":[{"text":"impl<T: Copy + Debug + Eq + Hash> Node<T> {","highlight_start":1,"highlight_end":42}],"label":"method in this implementation","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":708,"byte_end":729,"line_start":28,"line_end":28,"column_start":12,"column_end":33,"is_primary":true,"text":[{"text":" pub fn add_weighted_neighbor(mut self, value: T, weight: u32) -> Self {","highlight_start":12,"highlight_end":33}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: method `add_weighted_neighbor` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:28:12\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m27\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mimpl<T: Copy + Debug + Eq + Hash> Node<T> {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-----------------------------------------\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mmethod in this implementation\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m28\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m pub fn add_weighted_neighbor(mut self, value: T, weight: u32) -> Self {\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"}
|
||||
{"$message_type":"diagnostic","message":"crate `Graph` should have a snake case name","code":{"code":"non_snake_case","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":true,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"convert the identifier to snake case: `graph`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"`#[warn(non_snake_case)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: crate `Graph` should have a snake case name\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mhelp\u001b[0m\u001b[0m: convert the identifier to snake case: `graph`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(non_snake_case)]` on by default\u001b[0m\n\n"}
|
||||
{"$message_type":"diagnostic","message":"2 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 2 warnings emitted\u001b[0m\n\n"}
|
@ -0,0 +1 @@
|
||||
636b2463fd7d9772
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user